mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
feat(core): Allow specifying Content-Security-Policy-Report-Only (#15805)
This commit is contained in:
@@ -32,4 +32,10 @@ export class SecurityConfig {
|
||||
// TODO: create a new type that parses and validates this string into a strongly-typed object
|
||||
@Env('N8N_CONTENT_SECURITY_POLICY')
|
||||
contentSecurityPolicy: string = '{}';
|
||||
|
||||
/**
|
||||
* Whether to set the `Content-Security-Policy-Report-Only` header instead of `Content-Security-Policy`.
|
||||
*/
|
||||
@Env('N8N_CONTENT_SECURITY_POLICY_REPORT_ONLY')
|
||||
contentSecurityPolicyReportOnly: boolean = false;
|
||||
}
|
||||
|
||||
@@ -272,6 +272,7 @@ describe('GlobalConfig', () => {
|
||||
blockFileAccessToN8nFiles: true,
|
||||
daysAbandonedWorkflow: 90,
|
||||
contentSecurityPolicy: '{}',
|
||||
contentSecurityPolicyReportOnly: false,
|
||||
},
|
||||
executions: {
|
||||
pruneData: true,
|
||||
|
||||
Reference in New Issue
Block a user