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

Error about inline Javascript #273

Open
carlsonp opened this issue Dec 31, 2020 · 2 comments
Open

Error about inline Javascript #273

carlsonp opened this issue Dec 31, 2020 · 2 comments
Assignees
Labels

Comments

@carlsonp
Copy link
Owner

See web developer window...

Chrome:

Refused to execute inline script because it violates the...

Firefox:

Content Security Policy: The page’s settings blocked the loading of a resource at inline (“script-src”).

Tree test and card sort broken, didn't try others. It looks like this inline Javascript needs to be moved into their own files?

@carlsonp
Copy link
Owner Author

Turns out it's content security policy (CSP) which is part of the NPM Helmet package.

https://github.com/helmetjs/helmet/tree/main/middlewares/content-security-policy

It can be turned off via:

app.use(helmet({contentSecurityPolicy: false}));

But I don't think that's the correct solution.

@carlsonp
Copy link
Owner Author

carlsonp commented Jan 1, 2021

Looks like any inline <script></script> Javascript needs to go.

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

No branches or pull requests

2 participants