-
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
Upstream Scheme is not applied to DownstreamScheme, if latter is not specified #1509
Comments
How to fix, did you get around it? |
@kgrosvenor |
@abhiphirke Hi Abhijeet! First,
Please, stop any experiments with wss-protocols! You can use http and https protocols only. The ws & SignalR protocols are supported partially by legacy specs. Second,
That's wrong! Changing protocols requires you to provide new settings for a route. Moreover you have to enable this protocols in ASP.NET pipeline during its building in Startup.cs or Program.cs.
I believe this is absolutely correct logic! Third,
Why do you think so? Finally, So, Abhijeet, as a software architect, could you send your feedback please, if you're still interested for sure? |
@abhiphirke Hi Abhijeet! |
…SocketsProxyMiddleware (#1689) * Update WebSocketsProxyMiddleware.cs Fix WebSocket for SignalR * Repalce url protocol after null check * small refactoring * Add error log when replacing protocol in WebSocketProxyMiddleware Co-authored-by: Raman Maksimchuk <[email protected]> * Fix build * Code review * Fix unit test * Refactor to remove hardcoded strings of schemes * Define public constants * Add unit tests --------- Co-authored-by: raman-m <[email protected]>
@abhiphirke Could you test & verify the bug fix plz? You just need to update develop branch of your forked repo. |
Expected Behavior / New Feature
If
DownstreamScheme
is not specified in a Route in configuration, the upstream scheme should be used to forward request to the downstream for the URLs other than http/https.Basically, I want to support long polling as well as websockets on a SignalR hub/client in my application.
In both cases, I have to hit the same URL, except that my up and down stream schemes change.
I cannot create two entries with same url but different
DownstreamScheme
s at the same time. [I hope my understanding is right here. If not, please enlighten me. :) ]Actual Behavior / Motivation for New Feature
When I follow the steps below, I get exception:
Steps to Reproduce the Problem
DownstreamScheme
in the/myHub?id=<id>
url route configurationHttpTransportType
toLongPolling
on both client and serverHttpTransportType
toWebSockets
on both client and serverIn each case, following URLs should be used on downstream without changing any configuration:
LongPolling:
https://localhost:1234/myHub?id=<id>
WebSockets:
wss://localhost:1234/myHub?id=<id>
[Logs show that Ocelot is still setting downstream to https]If Ocelot behaves in the above (mentioned in Expected Behavior) manner, then my code will work without hassles.
The text was updated successfully, but these errors were encountered: