Add config option for report URI in CSP

This option is needed as it's currently not possible to add an report
URI by the directives array. This option also allows to get CSP reports
not only on docker based setup but also on our heroku instances.

Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
This commit is contained in:
Sheogorath
2018-03-10 14:34:14 +01:00
parent 21be5a5517
commit efa490a50f
4 changed files with 12 additions and 2 deletions

View File

@@ -18,7 +18,8 @@ module.exports = {
directives: {
},
addDefaults: true,
upgradeInsecureRequests: 'auto'
upgradeInsecureRequests: 'auto',
reportURI: undefined
},
protocolusessl: false,
usecdn: true,

View File

@@ -15,7 +15,8 @@ module.exports = {
preload: toBooleanConfig(process.env.HMD_HSTS_PRELOAD)
},
csp: {
enable: toBooleanConfig(process.env.HMD_CSP_ENABLE)
enable: toBooleanConfig(process.env.HMD_CSP_ENABLE),
reportURI: process.env.HMD_CSP_REPORTURI
},
protocolusessl: toBooleanConfig(process.env.HMD_PROTOCOL_USESSL),
alloworigin: toArrayConfig(process.env.HMD_ALLOW_ORIGIN),