-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Add workaround for sockjs@~0.3.19 #1608
Add workaround for sockjs@~0.3.19 #1608
Conversation
sockjs will remove Origin header, however Origin header is required for checking host. This workaround maybe broken at sockjs@^0.14.x because of refactoring.
I'll fix code style. sorry |
Codecov Report
@@ Coverage Diff @@
## master #1608 +/- ##
==========================================
- Coverage 74.25% 73.93% -0.33%
==========================================
Files 10 10
Lines 672 679 +7
==========================================
+ Hits 499 502 +3
- Misses 173 177 +4
Continue to review full report at Codecov.
|
Re: PR title, it's |
I can confirm this fixes the websocket origin checking issue with projects created by |
@lbogdan Thanks! |
Yes, this definitely fixes the issue. |
It's working for me, @3846masa thanks |
Good night everybody, I don't know how to apply this workaround in my Angular project, what do I have to do. BR |
It seems like I'm still getting this even after installing |
Also still getting this error with 3.1.14 & |
Also still getting this error with 3.1.14 & symfony proxy. I solved with Encore.configureDevServerOptions(options => {
options.allowedHosts = ['my-domain.wip']
}) |
For Bugs and Features; did you add new tests?
No
Motivation / Use-Case
sockjs will remove
Origin
header, however Origin header is required for checking host (#1603).See #1604 (comment)
This workaround overwrote
Session.prototype.decorateConnection
.(See https://github.com/sockjs/sockjs-node/blob/v0.3.19/src/transport.coffee#L112-L140)
Breaking Changes
Additional Info
This workaround maybe broken at
sockjs@^0.4.x
because sockjs are refactoring now.When sockjs/sockjs-node#247 is merged, this workaround is not necessary.