Proxying websocket leads to immediate closure on the server side #10
Unanswered
jdalrymple
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a nuxt config using the proxy settings like:
I then make a client side websocket connection:
This successfully flows through the proxy to the server endpoint located at:
ws://localhost:8081/endpoint
, however, the server seeings the socket connection in a closed immediately - ready state (3).For the record, the server side handler is a koa application using the koa-websockets middleware. When tested without the proxy middleware, everything is fine. Only when i include the proxy, does it have this behaviour.
Im not sure if I'm missing a setting on the proxy side, or if i should be handling it differently on the server side. Any suggestions would be amazing!
Beta Was this translation helpful? Give feedback.
All reactions