security: add a content security policy

This commit is contained in:
James Xylight committed 2025-07-14 18:35:49 -07:00
1 parent b08df2a966
commit 6389ec06a2
1 file changed
+10 -8
+10 -8
View File
@@ -25,14 +25,16 @@ const config = {
},
})
: auto(),
// csp: {
// directives: {
// 'script-src': ['self'],
// 'object-src': ['none'],
// 'base-uri': ['none']
// },
// mode: 'nonce'
// }
csp: {
directives: {
'script-src': ['self'],
},
// must be specified with either the `report-uri` or `report-to` directives, or both
reportOnly: {
'script-src': ['self'],
'report-uri': ['/'],
},
},
alias: {
'mono-svelte': 'src/lib/mono',
},