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

@ -149,3 +149,4 @@ pascoual:pdfkit
wekan-accounts-lockout
lmieulet:meteor-coverage
meteortesting:mocha
browser-policy-content

View file

@ -19,6 +19,7 @@ blaze@2.5.0
blaze-tools@1.1.2
boilerplate-generator@1.7.1
browser-policy-common@1.0.11
browser-policy-content@1.1.1
browser-policy-framing@1.1.0
caching-compiler@1.2.2
caching-html-compiler@1.2.0

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;