@faranglao/sv-prod
v0.0.1
Published
A library for Svelte web applications, improving safety using HTTP Response Headers
Downloads
5
Readme
sv-prod library
A Svelte library that adds some of the bits you will need in production environments.
Getting Started
# add the package to your project
npm install -d @faranglao/sv-prodAdd HTTP Security Response Headers
Add the ServerHookSecurityHeaders server hook.
// src/hooks.server.ts
import { ServerHookSecurityHeaders } from '@faranglao/sv-prod';
export const handle = ServerHookSecurityHeaders().handle;Your application will now return the following HTTP security response headers:
permissions-policy: geolocation=(), camera=(), microphone=()
referrer-policy: strict-origin-when-cross-origin
x-content-type-options: nosniff
x-frame-options: DENY
x-xss-protection: 1; mode=blockNote: The x-sveltekit-page header will have been removed from the HTTP response to prevent unnecessary information disclosure.
Check the security headers and best practices of your website with Mozilla Observatory or Security Headers 🧪
