-
Notifications
You must be signed in to change notification settings - Fork 758
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
Content Security Policy errors with (Latest) Chrome browser cause Cannot Get error #2062
Comments
Added sample minimal html file. |
I'm having the same error.
After rolling back to my previous version (2.27.4) the error persisted to my surprise (I wasn't having it in the past), and in my terminal I saw this other error:
After checking In browser-sync-client v2.29.3 the |
A CSP can be defined in a header, not just in the page body. Open the developer tools, network tab. Get the response headers when the page is loaded, and share them here. |
I got the same error when I tried |
Chrome Version 121.0.6167.161 (Official Build) (64-bit) on Windows 2016 DataCenter throws Content Security Policy (CSP) error.
Hope you don't mind me raising this - spent a few hours googling for a solution but not found. Feels like an issue with Chrome getting more focussed on security. Looked thru https://browsersync.io/ but no solution was obvious.
And BTW, Windows 2016 DataCenter is what you get from Amazon Workspaces whis is a cloud desktop solution. It is equiv to Windows 10 for practical purposes. Anyway the issue here is CSP rather than low-level code issues so I don't think this is a contributing factor.
The full error in the Chrome console is
The source code in the browser is
The browser shows the Cannot GET / message.
The web page used for testing is totally minimal - no includes or other script files
It appears that Chrome does not like inline scripts. Is it possible to set CSP headers via browser-sync config ?
Steps to reproduce/test case
No possible in this case - you need Chrome / the issue surfaces in the browser.
Please specify which version of Browsersync, node and npm you're running
Affected platforms
Browsersync use-case
If CLI, please paste the entire command below
This is the scripts section of the package.json file.
The text was updated successfully, but these errors were encountered: