Fix Can't add attachments because of Content-Security-Policy.

Thanks to Ben0it-T and xet7 !

Fixes #4461
This commit is contained in:
Lauri Ojansivu 2022-04-06 17:26:39 +03:00
parent 7eb04897ab
commit 0d9c37b006
3 changed files with 9 additions and 0 deletions

View file

@ -1,6 +1,13 @@
import { BrowserPolicy } from 'meteor/browser-policy-common';
Meteor.startup(() => {
// Default allowed
BrowserPolicy.content.allowInlineScripts();
BrowserPolicy.content.allowEval();
BrowserPolicy.content.allowInlineStyles();
BrowserPolicy.content.allowSameOriginForAll();
if (process.env.BROWSER_POLICY_ENABLED === 'true') {
// Trusted URL that can embed Wekan in iFrame.
const trusted = process.env.TRUSTED_URL;