Replies: 1 comment
-
Hi! If I understand the article here this header is not needed anymore in new versions of Chrome. Could you please check? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi
I am using Socket.io in a locally developed Node instance and getting the following error in Chrome (My 'Client' in this case is a Chrome Extension):
Access to XMLHttpRequest at 'http://localhost:8888/socket.io/?token=null&EIO=4&transport=polling&t=OaRktub' from origin 'https://docs.google.com' [Where my Chrome Extension runs] has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Private-Network' header was present in the preflight response for this private network request targeting the
local
address space.Is there some configuration flag I should be setting on my local server to return this header? as I can find very little written on this but this must affect everyone developing locally. I have tried setting the header just after I initialize socket.io by adding the following, but to no avail
io.engine.on("headers", (headers) => { headers["Access-Control-Allow-Private-Network"] = true; });
I have tried everything I can think of to attach the 'Access-Control-Allow-Private-Network' header to the response, but I must be doing something wrong as I can never get around this no matter what I do.
Thanks
Beta Was this translation helpful? Give feedback.
All reactions