Tech C**P
15 subscribers
161 photos
9 videos
59 files
304 links
مدرس و برنامه نویس پایتون و لینوکس @alirezastack
Download Telegram
Caddy is the HTTP/2 web server with automatic HTTPS. I wanted to proxy pass websocket service using Caddy but it didn't work:

wss.example.org {
proxy / myservice:8083 {
header_upstream Host {host}
header_upstream X-Real-IP {remote}
}
tls myemail@gmail.com
}


In the documentation it is mentioned that proxy can proxy pass web sockets too. The problem was about not using websocket inside of the proxy stanza, so we solved it using:

wss.example.org {
proxy / myservice:8083 {
header_upstream Host {host}
header_upstream X-Real-IP {remote}
websocket
}
tls myemail@gmail.com
}



#webserver #caddy #proxy #proxy_pass #wss #ws #websocket