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

Merge pull request #165 from sasjs/issue-164

fix: helmet config on http mode
This commit is contained in:
Allan Bowe
2022-05-10 14:01:40 +03:00
committed by GitHub
2 changed files with 5 additions and 1 deletions

1
.gitignore vendored
View File

@@ -11,3 +11,4 @@ sasjscore/
certificates/
executables/
.env
api/csp.config.json

View File

@@ -35,9 +35,12 @@ export const cookieOptions = {
maxAge: 24 * 60 * 60 * 1000 // 24 hours
}
const cspConfigJson = getEnvCSPDirectives(HELMET_CSP_CONFIG_PATH)
const cspConfigJson: { [key: string]: string[] | null } = getEnvCSPDirectives(
HELMET_CSP_CONFIG_PATH
)
const coepFlag =
HELMET_COEP === 'true' || HELMET_COEP === undefined ? true : false
if (PROTOCOL === 'http') cspConfigJson['upgrade-insecure-requests'] = null
/***********************************
* CSRF Protection *