We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I can obtain websocket data normally through the websocat command:
websocat ws://report-worker-2.noscription.org -H "Origin: https://noscription.org" -H "User-Agent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36'" {"eventId":"000002ae5f7f50394eea19e66e263f7e6fa4ccc9120349006178e2f3db5e1311"} {"eventId":"000002ae5f7f50394eea19e66e263f7e6fa4ccc9120349006178e2f3db5e1311"} {"eventId":"000002ae5f7f50394eea19e66e263f7e6fa4ccc9120349006178e2f3db5e1311"}
But I got 403 Forbidden when I use tokio_tungstenite 0.21.0:
403 Forbidden
tokio_tungstenite 0.21.0
fn get_ws_request() -> Request<()> { let mut request = "ws://report-worker-2.noscription.org".into_client_request().unwrap(); request.headers_mut() .insert("Origin", "https://noscription.org".parse().unwrap()); request.headers_mut() .insert("User-Agent", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36".parse().unwrap()); request } let request = get_ws_request(); let (mut ws_stream, _) = tokio_tungstenite::connect_async(request).await?;
The text was updated successfully, but these errors were encountered:
Have you dumped the content of the HTTP request in both cases? I'm pretty sure there are some differences.
Beware the following things:
Sorry, something went wrong.
No branches or pull requests
I can obtain websocket data normally through the websocat command:
But I got
403 Forbidden
when I usetokio_tungstenite 0.21.0
:The text was updated successfully, but these errors were encountered: