websocket stuff

This commit is contained in:
2026-02-02 02:39:06 -05:00
parent fc78a095a9
commit 747d310375
2 changed files with 69 additions and 0 deletions

View File

@@ -22,10 +22,21 @@ public class WebSocketProxyMiddleware
_next = next;
_settings = settings.Value;
_logger = logger;
_logger.LogInformation("🔧 WebSocketProxyMiddleware initialized - Jellyfin URL: {Url}", _settings.Url);
}
public async Task InvokeAsync(HttpContext context)
{
// Log ALL requests to /socket path for debugging
if (context.Request.Path.StartsWithSegments("/socket", StringComparison.OrdinalIgnoreCase))
{
_logger.LogInformation("📡 Request to /socket path - IsWebSocketRequest: {IsWs}, Method: {Method}, Headers: {Headers}",
context.WebSockets.IsWebSocketRequest,
context.Request.Method,
string.Join(", ", context.Request.Headers.Select(h => $"{h.Key}={h.Value}")));
}
// Check if this is a WebSocket request to /socket
if (context.Request.Path.StartsWithSegments("/socket", StringComparison.OrdinalIgnoreCase) &&
context.WebSockets.IsWebSocketRequest)