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