protected boolean isInvalidOrigin(FullHttpRequest req) {
        final String origin = req.headers().get(HttpHeaderNames.ORIGIN);
        if (origin == null || !origin.toLowerCase().endsWith(originDomain)) {
            logger.error("Invalid Origin header {} in WebSocket upgrade request", origin);
            return true;
        }
        return false;
    }
@Test
    void testIsInvalidOrigin() {
        ZuulPushAuthHandlerTest authHandler = new ZuulPushAuthHandlerTest();

        final DefaultFullHttpRequest request =
                new DefaultFullHttpRequest(HttpVersion.HTTP_1_1, HttpMethod.POST, "/ws", Unpooled.buffer());

        // Invalid input
        assertTrue(authHandler.isInvalidOrigin(request));
        request.headers().add(HttpHeaderNames.ORIGIN, "zuul-push.foo.com");
        assertTrue(authHandler.isInvalidOrigin(request));

        // Valid input
        request.headers().remove(HttpHeaderNames.ORIGIN);
        request.headers().add(HttpHeaderNames.ORIGIN, "zuul-push.netflix.com");
        assertFalse(authHandler.isInvalidOrigin(request));
    }