-
-
Notifications
You must be signed in to change notification settings - Fork 307
Error: A wildcard '*' cannot be used in the 'Access-Control-Allow-Origin' #177
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
Comments
The client shouldn't really change how CORS works on the web so it looks to me that was already an existing issue. It's most likely the cause of https://github.com/sockjs/sockjs-node/blob/master/src/trans-xhr.coffee#L60-L61 as it checks if Got steps to reproduce this? Like using InPrivate browsing mode to visit your page (this causes |
Details like browser and full request/response header dump would be really helpful. |
The mentioned error is from chrome 42.0.2311.90 m in normal browsing. This is the log from firefox developer edition (39.0a2), the output is the same in private browsing and in normal browsing:
Reading this line I think that I need run a local server to retrieve the index.html and not opening the file directly. The headers:Response headers
Request headers
|
Seems that a wildcard "*" is not a valid Access-Control-Allow-Headers value: http://stackoverflow.com/questions/13146892/cors-access-control-allow-headers-wildcard-being-ignored |
We aren't setting that header, from your response dump |
As you can see from your the request you made the Are you running this from a |
Anyway the response to a "credentialed" request cannot include the [1] : https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS#Requests_with_credentials |
This explains why the request |
@lpinca Ah, I completely missed that part. Yes, so you're serving from a |
With a local server works fine.
Request headers
Response headers
|
@3rd-Eden Are you saying that |
@brycekahle Yes, it should respond with |
Otherwise local files do not work because of CORS issues, see sockjs/sockjs-node#177
Any news why this will be released as 0.3.16? |
@ivan-kleshnin I just got back from holiday. I will do a release this week and ping you when it happens. |
@brycekahle hey, has this been released? CORS in webpack-dev-server is broken right now webpack/webpack-dev-server#277 |
@KyleAMathews not yet, sorry. I'll do my best to get it out this evening. |
💯
|
@KyleAMathews sorry I haven't released this yet. Work has been crazy because we just launched a product. |
Update? 🤓 |
may this condition still in sockjs-client v1.0.3 |
@ivan-kleshnin @KyleAMathews @garrettmaring @genffy I just published |
@brycekahle Is this confirmed to be working? Which commit could I take a look at (only saw README update one)? |
Hi
I'm running node-server in windows in my local computer. With sockjs-client 1.0.0-beta.12 (I use browserify for bundle the frontend), when I try to connect chrome gives me this error:
XMLHttpRequest cannot load http://localhost:12540/websocket/info?t=1429552020306. A wildcard '*' cannot be used in the 'Access-Control-Allow-Origin' header when the credentials flag is true. Origin 'null' is therefore not allowed access.
It's my fault or is a error from the beta version?
client
server
The text was updated successfully, but these errors were encountered: