mirror of
https://github.com/Portabase/portabase.git
synced 2026-07-14 11:16:13 +02:00
Working on header and CSP.
This commit is contained in:
+5
-2
@@ -30,13 +30,12 @@ function buildCSPHeader(): string {
|
|||||||
|
|
||||||
function buildPermissionsPolicy(): string {
|
function buildPermissionsPolicy(): string {
|
||||||
return Object.entries(PORTABASE_DEFAULT_SETTINGS.SECURITY.PERMISSIONS_POLICY)
|
return Object.entries(PORTABASE_DEFAULT_SETTINGS.SECURITY.PERMISSIONS_POLICY)
|
||||||
.map(([feature, values]) => `${feature}=${values.join(", ")}`)
|
.map(([feature, values]) => `${feature.toLowerCase()}=${values.join(", ")}`)
|
||||||
.join(", ");
|
.join(", ");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const nextConfig: NextConfig = {
|
const nextConfig: NextConfig = {
|
||||||
output: "standalone",
|
output: "standalone",
|
||||||
typescript: {
|
typescript: {
|
||||||
@@ -76,6 +75,10 @@ const nextConfig: NextConfig = {
|
|||||||
key: 'Referrer-Policy',
|
key: 'Referrer-Policy',
|
||||||
value: 'strict-origin-when-cross-origin',
|
value: 'strict-origin-when-cross-origin',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
key: 'Strict-Transport-Security',
|
||||||
|
value: 'max-age=63072000; includeSubDomains; preload',
|
||||||
|
}
|
||||||
// ...other security headers
|
// ...other security headers
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user