diff --git a/src/main/java/io/mantisrx/api/push/MantisSSEHandler.java b/src/main/java/io/mantisrx/api/push/MantisSSEHandler.java index 7e5a81e..bc2ddbb 100644 --- a/src/main/java/io/mantisrx/api/push/MantisSSEHandler.java +++ b/src/main/java/io/mantisrx/api/push/MantisSSEHandler.java @@ -146,8 +146,10 @@ private boolean isTunnelPingsEnabled(String uri) { private boolean isWebsocketUpgrade(HttpRequest request) { HttpHeaders headers = request.headers(); - return "Upgrade".equalsIgnoreCase(headers.get(HttpHeaderNames.CONNECTION)) && - "WebSocket".equalsIgnoreCase(headers.get(HttpHeaderNames.UPGRADE)); + // Header "Connection" contains "upgrade" (case insensitive) and + // Header "Upgrade" equals "websocket" (case insensitive) + return headers.get(HttpHeaderNames.CONNECTION).toLowerCase().contains("upgrade") && + headers.get(HttpHeaderNames.UPGRADE).toLowerCase().equals("websocket"); }