-
-
Notifications
You must be signed in to change notification settings - Fork 307
Missing "origin" in allowedHeaders #247
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
Conversation
There is missing "origin" in allowedHeaders, docs says that it should be in connection.headers.
/cc @brycekahle friendly ping |
@evilebottnawi @brycekahle just confirming: this causes breakage in |
@egasimus yep |
@majek ? |
AFAICT this is not a behavior change in sockjs-node from v0.3.19. sockjs-node/src/transport.coffee Line 133 in 14a5c3c
|
@brycekahle please clarify |
@evilebottnawi Despite the docs indicating |
@brycekahle you are right. There was a change in However, The commit comment says 'it is meaningless in SockJS context' so I'll look more into this |
This is likely due to the fact that SockJS will utilize iframes to get around same origin restrictions, so the origin of the iframe will not match the origin of the parent document. See https://github.com/sockjs/sockjs-node#authorisation for more information. |
@brycekahle It was used without |
I don't understand. Can you rephrase? |
@brycekahle why we can't merge this PR? |
For the same reason that #247 (comment) states. |
@brycekahle but it can still be optional to use maybe? Today iframe transport is in most cases useless, but let's make origin header present only by setting an option parameter |
I think the only secure way would be if the server knew |
@brycekahle maybe you better understand problem trying |
@evilebottnawi I understand the problem well enough, but I cannot make a change that doesn't work for all library users in a secure way. |
@brycekahle maybe we can add option for this? |
This is what I'm suggesting in #247 (comment) but I need more input on what |
@brycekahle can you clarify? We just need |
Yes, but can |
@brycekahle yes, you can setup |
Hi folks. Why isn't this PR merged? It causes so much pain on the dependent frameworks. Specifically: dotnet/aspnetcore#7812 and others too. |
@mkArtakMSFT Can you explain how having |
I think this comment says it all: https://github.com/webpack/webpack-dev-server/pull/1608/files#diff-15fb51940da53816af13330d8ce69b4eR47 What's happening in ASP.NET Core case, we start the dev server as a seprate process and proxy all the requests to it. Without the |
@mkArtakMSFT When you say "dev server", do you mean
This PR would not affect anything regarding the browser's ability to read the Please also read the rest of this thread. There are security concerns regarding the |
Hi @brycekahle , I'm facing a similar problem with not having the origin in the header. My problem is to connect to the websocket we have a list of allowed origins, for security reasons. Without know the origin and check if it is part of the allowed origin list, everyone can connect to the websocket. Do you have a solution for this problem? I'm trying to avoid apply the workaround mentioned |
@brycekahle The documentation is wrong as well, it says:
Source: https://github.com/sockjs/sockjs-node#connection-instance But the |
There is missing "origin" in allowedHeaders, docs says that it should be in connection.headers.