1
0
mirror of https://github.com/dzeiocom/libs.git synced 2025-04-22 10:52:11 +00:00

fix(config): incorrect config

Signed-off-by: Avior <f.bouillon@aptatio.com>
This commit is contained in:
Florian Bouillon 2022-12-12 12:44:49 +01:00
parent 030dc68587
commit 325355c09c
Signed by: Florian Bouillon
GPG Key ID: E05B3A94178D3A7C

View File

@ -60,11 +60,11 @@ export const config = (options?: Options): typeof defaultConfig & NextConfig =>
"form-action 'self'; " +
"manifest-src 'self'; " +
"prefetch-src 'self'; " +
`script-src 'self' 'unsafe-inline' ${hosts?.script?.map((it) => `'${it}'`)?.join(' ') ?? ''}; ` +
`style-src 'self' 'unsafe-inline' ${hosts?.style?.map((it) => `'${it}'`)?.join(' ') ?? ''}; ` +
`img-src data: 'self' ${hosts?.img?.map((it) => `'${it}'`)?.join(' ') ?? ''}; ` +
`font-src 'self' ${hosts?.font?.map((it) => `'${it}'`)?.join(' ') ?? ''}; ` +
`connect-src 'self' ${hostlist.filter((it) => !it.startsWith('unsafe')).map((it) => `'${it}'`).join(' ')}; ` +
`script-src 'self' 'unsafe-inline' ${hosts?.script?.join(' ') ?? ''}; ` +
`style-src 'self' 'unsafe-inline' ${hosts?.style?.join(' ') ?? ''}; ` +
`img-src data: 'self' ${hosts?.img?.join(' ') ?? ''}; ` +
`font-src 'self' ${hosts?.font?.join(' ') ?? ''}; ` +
`connect-src 'self' ${hostlist.filter((it) => !it.startsWith('unsafe')).join(' ')}; ` +
"base-uri 'self';"
}
const XXssProtection = {