mirror of
https://github.com/theoludwig/theoludwig.git
synced 2024-11-04 20:41:30 +01:00
42 lines
1.1 KiB
JavaScript
42 lines
1.1 KiB
JavaScript
const nextPWA = require('next-pwa')
|
|
const nextTranslate = require('next-translate')
|
|
const { createSecureHeaders } = require('next-secure-headers')
|
|
|
|
/** @type {import("next").NextConfig} */
|
|
module.exports = nextTranslate(
|
|
nextPWA({
|
|
reactStrictMode: true,
|
|
pwa: {
|
|
disable: process.env.NODE_ENV !== 'production',
|
|
dest: 'public'
|
|
},
|
|
headers() {
|
|
return [
|
|
{
|
|
source: '/:path*',
|
|
headers: createSecureHeaders({
|
|
contentSecurityPolicy: {
|
|
directives: {
|
|
defaultSrc: ["'self'"],
|
|
scriptSrc: [
|
|
"'self'",
|
|
'data:',
|
|
"'unsafe-eval'",
|
|
"'unsafe-inline'"
|
|
],
|
|
styleSrc: ["'self'", "'unsafe-inline'"],
|
|
imgSrc: ['*', 'data:', 'blob:'],
|
|
mediaSrc: "'none'",
|
|
connectSrc: '*',
|
|
objectSrc: "'none'",
|
|
fontSrc: "'self'",
|
|
baseURI: "'none'"
|
|
}
|
|
}
|
|
})
|
|
}
|
|
]
|
|
}
|
|
})
|
|
)
|