Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unsafe-Eval listed but still blocked #28

Closed
binarykitchen opened this issue Jan 24, 2014 · 3 comments
Closed

Unsafe-Eval listed but still blocked #28

binarykitchen opened this issue Jan 24, 2014 · 3 comments

Comments

@binarykitchen
Copy link

I have these policies:

    var policy = {
        defaultPolicy: {
            'default-src': [
                "'self'",
                "data:",
                "'unsafe-inline'",
                "'unsafe-eval'"
            ],
            'img-src': [
                "'self'",
                "data:",
                "www.google-analytics.com"
            ],
            'script-src': [
                "'self'",
                "'unsafe-inline'",
                "'unsafe-eval'",
                "www.google-analytics.com"
            ]
        }
    };

    helmet.csp.policy(policy);

    app.use(helmet.csp());

but still, Firefox complains with:


Content Security Policy: The page's settings blocked the loading of a resource: An attempt to call JavaScript from a string (by calling a function like eval) has been blocked

call to eval() or related function blocked by CSP


Huh? I am allowing unsafe-evals here. Can anyone explain?

@EvanHahn
Copy link
Member

Could you paste what the HTTP header is?

@EvanHahn
Copy link
Member

I'm going to close this issue because it seems inactive (and is about old code).

@binarykitchen
Copy link
Author

Right, it is working fine now. Sorry for not replying earlier ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants