mojolicious / mojo

:sparkles: Mojolicious - Perl real-time web framework
https://mojolicious.org
Artistic License 2.0
2.66k stars 576 forks source link

Websocket - 101 Switching Protocols #2143

Closed leandrocombr closed 5 months ago

leandrocombr commented 5 months ago

Mojo WebSocket

Apache Proxy Reverse

<Proxy *>
    Order deny,allow
    Allow from all
</Proxy>

ProxyRequests Off
ProxyPreserveHost On

ProxyPass /v4 http://localhost:3010/
ProxyPassReverse /v4/ http://localhost:3010/

<Location "/websocket">
    ProxyPass "ws://localhost:3010/websocket"
</Location>

RequestHeader set X-ProxyPassReverse-UsePrefix "On"
RequestHeader set X-Forwarded-HTTPS "1"
RequestHeader set X-Forwarded-Ssl on
RequestHeader set X-Forwarded-Proto "https"

Presenting the message in the browser: 101 Switching Protocols

Websocket connection opens and closes, how to solve it?

When I run http://url:11001/websocket connection keeps open

Any configuration in Apache?