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 Origin Header in native app #27
base: main
Are you sure you want to change the base?
Conversation
ewebsock/Cargo.toml
Outdated
log = "0.4" | ||
|
||
# native: | ||
[target.'cfg(not(target_arch = "wasm32"))'.dependencies] | ||
tungstenite = { version = ">=0.17, <=0.20" } | ||
tungstenite = { version = ">=0.17, <=0.21" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this needs to be set to the version number of the first tungstenite release with the with_header
function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes you're right !
I'm waiting for the new version. I'm tagging the PR as DRAFT to wait for it
ba720a7
to
f6d612e
Compare
When tungstenite Now waiting for the version bump |
Hello,
In the native app, the Websocket protocol can lead to error because it doesn't act like the web interface.
When we are using the WebSocket API (in the browser), it add automatically some headers - like the
Origin
header.In fact this header is mandatory, as explained in the RFC :
However, if we don't set the
Origin
header in the native app, the app "could" not act the same as in the browserIn this PR, I had the Origin header to the client.
Note that
Thanks