-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Examples not working on safari #1806
Comments
The lws examples all promote using a strict Content Security Policy, with the idea that if the examples build it in from the start then users will use it. The default CSP includes this
On Firefox and Chrome, https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/connect-src You accessed the page in the browser using "http://localhost:7681"? |
Oh it seems it's ambiguous and different only in Safari |
I pushed a patch on master lws that might help with it |
Perfect. It works to me. |
Now it works but sometimes refreshing the page I got this error now ( only on Safari ) WebSocket connection to 'wss://localhost:7681/' failed: Compressed bit must be 0 if no negotiated deflate-frame extension Any idea why? |
It seems to be related to your other problem, not the SCP thing. You seem to be writing garbage on the wire in both this and the other case. Lws makes writing garbage hard, if you follow the rules about only using lws_write(), only using lws_write() once per WRITEABLE callback, only calling it from WRITEABLE, and not calling any lws api from any other thread than the event loop (except lws_cancel_service(), which is designed for it). |
I am trying to test the example on Safari ( MacOSx ) but it doesnot work.
I got this error on the console:
[Error] Refused to connect to ws://localhost:7681/ because it does not appear in the connect-src directive of the Content Security Policy.
[Error] SecurityError: The operation is insecure.
(anonymous function) (example.js:34)
new_ws (example.js:34)
(anonymous function) (example.js:39)
Any suggestion?
The text was updated successfully, but these errors were encountered: