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

CSP error when trying to run docs in browser #160

Closed
ghost opened this issue Jul 29, 2021 · 3 comments
Closed

CSP error when trying to run docs in browser #160

ghost opened this issue Jul 29, 2021 · 3 comments

Comments

@ghost
Copy link

ghost commented Jul 29, 2021

I get the following error in the console when I run 'npm run dev' along with a white screen that says Cannot GET / :

Refused to execute inline script because it violates the following Content Security Policy directive: "default-src 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-d/yERybm6Vg1oK5uXfPNUtFdLqpjo+RlG7iGStOnXLg='), or a nonce ('nonce-...') is required to enable inline execution. Note also that 'script-src' was not explicitly set, so 'default-src' is used as a fallback.

When using Express/Node, I've installed and set up Helmet, but not sure how to fix the error within this particular project.

@ghost
Copy link
Author

ghost commented Jul 30, 2021

Did some digging, and this is apparently an issue with BrowserSync. I was able to load the docs by adding /docs. Closing this for now.

@ghost ghost closed this as completed Jul 30, 2021
@ChildishGiant
Copy link
Member

Ah yeah, we made some changes to directories so now you need to add /docs on the end when previewing. If there's a way to make the link in the terminal show that, ill happily make that change.

@ghost
Copy link
Author

ghost commented Jul 31, 2021

Not sure about the terminal but I think it'd be a good idea to add /docs to the end of the URL in the README.

@ghost ghost mentioned this issue Jul 31, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant