2021-04-18 01:56:23 +02:00
|
|
|
const nextPWA = require('next-pwa')
|
|
|
|
const nextTranslate = require('next-translate')
|
2021-08-12 01:19:11 +02:00
|
|
|
const { createSecureHeaders } = require('next-secure-headers')
|
2021-04-18 01:56:23 +02:00
|
|
|
|
2021-08-12 01:19:11 +02:00
|
|
|
/** @type {import("next").NextConfig} */
|
2021-04-18 01:56:23 +02:00
|
|
|
module.exports = nextTranslate(
|
|
|
|
nextPWA({
|
2021-12-04 15:52:51 +01:00
|
|
|
reactStrictMode: true,
|
2021-04-18 01:56:23 +02:00
|
|
|
pwa: {
|
|
|
|
disable: process.env.NODE_ENV !== 'production',
|
|
|
|
dest: 'public'
|
2021-08-12 01:19:11 +02:00
|
|
|
},
|
2021-12-04 15:52:51 +01:00
|
|
|
headers() {
|
2021-08-12 01:19:11 +02:00
|
|
|
return [
|
|
|
|
{
|
|
|
|
source: '/:path*',
|
|
|
|
headers: createSecureHeaders({
|
|
|
|
contentSecurityPolicy: {
|
|
|
|
directives: {
|
|
|
|
defaultSrc: ["'self'"],
|
2022-02-22 21:19:42 +01:00
|
|
|
scriptSrc: [
|
|
|
|
"'self'",
|
|
|
|
'data:',
|
|
|
|
"'unsafe-eval'",
|
|
|
|
"'unsafe-inline'"
|
|
|
|
],
|
2021-08-12 01:19:11 +02:00
|
|
|
styleSrc: ["'self'", "'unsafe-inline'"],
|
|
|
|
imgSrc: ['*', 'data:', 'blob:'],
|
|
|
|
mediaSrc: "'none'",
|
|
|
|
connectSrc: '*',
|
|
|
|
objectSrc: "'none'",
|
|
|
|
fontSrc: "'self'",
|
|
|
|
baseURI: "'none'"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|
|
|
|
]
|
2021-04-18 01:56:23 +02:00
|
|
|
}
|
|
|
|
})
|
|
|
|
)
|