test(iis): wrapper test for ws
This commit is contained in:
@@ -20,6 +20,7 @@ app.Use(async (context, next) =>
|
||||
if (context.WebSockets.IsWebSocketRequest &&
|
||||
context.Request.Path.StartsWithSegments("/lst/api/logger/logs"))
|
||||
{
|
||||
Console.WriteLine("WebSocket request received!");
|
||||
try
|
||||
{
|
||||
var backendUri = new UriBuilder("ws", "localhost", 8080)
|
||||
|
||||
@@ -9,6 +9,10 @@
|
||||
<!-- Proxy all requests starting with /lst/ to the .NET wrapper (port 4000) -->
|
||||
<rule name="Proxy to Wrapper" stopProcessing="true">
|
||||
<match url="^lst/(.*)" />
|
||||
<conditions>
|
||||
<!-- Skip this rule if it's a WebSocket request -->
|
||||
<add input="{HTTP_UPGRADE}" pattern="^WebSocket$" negate="true" />
|
||||
</conditions>
|
||||
<action type="Rewrite" url="http://localhost:8080/{R:1}" />
|
||||
</rule>
|
||||
</rules>
|
||||
|
||||
Reference in New Issue
Block a user