mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-22 12:19:09 +00:00
feat(core): Allow specifying Content-Security-Policy-Report-Only (#15805)
This commit is contained in:
@@ -354,11 +354,13 @@ export class Server extends AbstractServer {
|
||||
errorMessage: 'The contentSecurityPolicy is not valid JSON.',
|
||||
},
|
||||
);
|
||||
const cspReportOnly = Container.get(SecurityConfig).contentSecurityPolicyReportOnly;
|
||||
const securityHeadersMiddleware = helmet({
|
||||
contentSecurityPolicy: isEmpty(cspDirectives)
|
||||
? false
|
||||
: {
|
||||
useDefaults: false,
|
||||
reportOnly: cspReportOnly,
|
||||
directives: {
|
||||
...cspDirectives,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user