-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
#1509 #1683 Replace non-WS protocols for the 'ClientWebSocket' in WebSocketsProxyMiddleware #1689
Conversation
Any progress? 1 test fails but it's not connected with my changes:
|
Sorry, but the last build has failed in one test only which is Ocelot.AcceptanceTests.ConfigurationReloadTests.should_reload_config_on_change Which test did you mean in previous message? I have no idea. |
Don't worry! The build is green now! ✅ |
@abhiphirke @zhaoyongjie183 |
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.
Probably we need to update configuration validators also to stop app forcibly if such WebSocket-routes with wrong scheme exist.
It's not the route scheme issue. WebSocket connection is usual HTTP connection with Upgrade header, it can be done with both "http://" or "ws://" endpoints in URL. For example, Android okhttp library makes "http://" endpoint connection for WebSocket, even when "ws://" was in |
@ArtRoman |
Fix WebSocket for SignalR
Co-authored-by: Raman Maksimchuk <dotnet044@gmail.com>
Done! See commit 5d9c214 |
@RaynaldM Put your eye on this plz! |
@ArtRoman Congrats! 🥳 |
Any idea on time to release this fix? We're having some trouble handling websocket requests through Ocelot, it has to go through a few layers of netscaler -> nginx -> ocelot, but even when we try nginx -> ocelot we receive the above error. |
Hi J!
Bad! What Ocelot version do you use currently? Based on .NET 7 ? |
Yes, I'm stuck here. Thank you! |
Fixes #1509 #1683
Fix WebSocket for SignalR
Proposed Changes
An ugly fix of
ArgumentException: Only Uris starting with 'ws://' or 'wss://' are supported. (Parameter 'uri')
exception from downstream host because 'uri' values starts from http, but this isn't allowed inClientWebSocket.ConnectAsync
.This will return
Expected HTTP 101 response but was '500 Internal Server Error'
error to upstream host.