Hi,
I am trying to secure my meteor app by enforcing a CSP (as recommended in the the ‘secure meteor’ book) and removing ‘unsafe-eval’ from script-src.
Below my server side code (localhost on my development machine), as well as the results on the client.
It appears that the line
BrowserPolicy.content.disallowEval();
does not remove ‘unsafe-eval’.
Any advice?
import {BrowserPolicy} from 'meteor/browser-policy';
BrowserPolicy.framing.disallow();
BrowserPolicy.content.disallowInlineScripts();
BrowserPolicy.content.disallowEval();
BrowserPolicy.content.disallowObject();
BrowserPolicy.content.allowImageOrigin('https://api.mapbox.com');
which gives the following result on the client:
default-src 'self';
script-src 'self' 'unsafe-eval';
connect-src * 'self';
img-src data: 'self' https://api.mapbox.com;
style-src 'self' 'unsafe-inline';
object-src 'none';