I’ve got a frontend and backend where the backend is running a socket.io server on port 4000. The frontend is trying to connect to that socket.io server like so:
Problem is, I want it to connect to /webrtc/socket.io/* and not directly to the domain.
My caddy file looks like this:
handle /webrtc {
reverse_proxy localhost:4000
}
I’ve also tried the recommended advice here:
But that gives me the same error in the browser.
Am I missing something? It seems like the frontend is ignoring the /webrtc prefix which I’d be ok with if I can get caddy to handle /socket.io directly.