Closed Julandia closed 8 months ago
The same issue.
any resolution or workaround please? i have the same issue.
Duplicate of #1040
Hi @Julandia !
Our company plans to use Ocelot as API gateway for the company intranet services.
Does your company use Ocelot now?
We had below authentication problem when routing the SignalR requests using Ocelot.
I guess this is Authentication problem for ws
sceme. Ocelot WebSockets pipeline has no Auth middlewares to process authenticated routes. See more details in #1040 please!
Is this a defect of Ocelot or do I miss some configuration?
Authentication is not implemented in Ocelot currently for WebSockets! Well... I recommend one common life coding hack:
Hope it helps!
Our company plans to use Ocelot as API gateway for the company intranet services. We had below authentication problem when routing the SignalR requests using Ocelot. Is this a defect of Ocelot or do I miss some configuration?
Expected Behavior / New Feature
I expect that when server side returns 401 authentication, Ocelot should return the error to upstream
Actual Behavior / Motivation for New Feature
Ocelot return 500 Internal Server Error
Steps to Reproduce the Problem
Error stack: Exception has occurred: CLR/System.Net.WebSockets.WebSocketException Exception thrown: 'System.Net.WebSockets.WebSocketException' in System.Private.CoreLib.dll: 'The server returned status code '401' when status code '101' was expected.' at System.Net.WebSockets.WebSocketHandle.d24.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Net.WebSockets.ClientWebSocket.d 16.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Ocelot.WebSockets.Middleware.WebSocketsProxyMiddleware.d__7.MoveNext() in C:\simhub\Ocelot\src\Ocelot\WebSockets\Middleware\WebSocketsProxyMiddleware.cs:line 118
Specifications