Websocket Proxying

This commit is contained in:
2026-02-02 02:19:43 -05:00
parent 65ca80f9a0
commit fc78a095a9
3 changed files with 241 additions and 2 deletions

View File

@@ -288,6 +288,15 @@ app.UseExceptionHandler(_ => { }); // Global exception handler
// Enable response compression EARLY in the pipeline
app.UseResponseCompression();
// Enable WebSocket support
app.UseWebSockets(new WebSocketOptions
{
KeepAliveInterval = TimeSpan.FromSeconds(120)
});
// Add WebSocket proxy middleware (BEFORE routing)
app.UseMiddleware<WebSocketProxyMiddleware>();
if (app.Environment.IsDevelopment())
{
app.UseSwagger();