Skip to content
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

Origin header should be optional and settable #151

Closed
steven851007 opened this issue Dec 25, 2015 · 4 comments
Closed

Origin header should be optional and settable #151

steven851007 opened this issue Dec 25, 2015 · 4 comments

Comments

@steven851007
Copy link
Contributor

According to the RFC:

The request MUST include a header field with the name |Origin|
[RFC6454] if the request is coming from a browser client. If
the connection is from a non-browser client, the request MAY
include this header field if the semantics of that client match
the use-case described here for browser clients. The value of
this header field is the ASCII serialization of origin of the
context in which the code establishing the connection is running.

@daltoniam
Copy link
Owner

This is a good point and thanks for linking to the RFC. I agree it should be settable, just want to be careful we don't break any currently working clients by removing the origin header that is sent now. I think we should test some common web socket servers with this change to ensure everything is good before we merge #152.

@steven851007
Copy link
Contributor Author

Good point. Although testing is always important maybe we can also set the previous hardcoded value as the default value for the new variable to keep the backward compatibility. What you think?

@acmacalister
Copy link
Collaborator

I like that idea of the default value. You want to add it your PR and we can merge it?

@steven851007
Copy link
Contributor Author

Done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants