I have this simple caddy JSON config to proxy request from https://localhost to my localhost server running on port 8080. That's working fine.
{
"apps": {
"http": {
"servers": {
"localhost": {
"listen": [":443"],
"routes": [
{
"match": [
{
"host": ["localhost"]
}
],
"handle": [
{
"handler": "reverse_proxy",
"upstreams": [
{
"dial": "localhost:8080"
}
]
}
]
}
]
}
}
}
}
}
But, I would also like my caddy server to either:
- reverse proxy calls from
wss:localhost:3000/ws
tows:localhost:3000/ws
(HTTPS to HTTP) - or simply ignore websocket calls and let them reach
ws:localhost:3000/ws
I have not found the proper example or documentation for JSON config.