1
0
mirror of https://github.com/sasjs/server.git synced 2025-12-10 11:24:35 +00:00

Merge pull request #167 from sasjs/cspconfig

fix: csp updates
This commit is contained in:
Allan Bowe
2022-05-12 10:53:21 +03:00
committed by GitHub
3 changed files with 5 additions and 3 deletions

View File

@@ -119,7 +119,7 @@ HELMET_COEP=
#
# Example config:
# {
# "img-src": ["'self'", "domain.com"],
# "img-src": ["'self'", "data:"],
# "script-src": ["'self'", "'unsafe-inline'"],
# "script-src-attr": ["'self'", "'unsafe-inline'"]
# }

View File

@@ -1,5 +1,5 @@
{
"img-src": ["'self'", "domen.com"],
"img-src": ["'self'", "data:"],
"script-src": ["'self'", "'unsafe-inline'"],
"script-src-attr": ["'self'", "'unsafe-inline'"]
}

View File

@@ -5,7 +5,9 @@ export const getEnvCSPDirectives = (
HELMET_CSP_CONFIG_PATH: string | undefined
) => {
let cspConfigJson = {
'script-src': ["'self'", "'unsafe-inline'"]
'img-src': ["'self'", 'data:'],
'script-src': ["'self'", "'unsafe-inline'"],
'script-src-attr': ["'self'", "'unsafe-inline'"]
}
if (