I switched from Freenas to UNRAID. I set up Caddy in a container. I also set up a reverse proxy, however I am unable to get HomeAssistant running on it. The page loads up fine, however when I enter the password, the loading circle just spins forever.
I get the following error in console: WebSocket connection to ‘wss://mysite.com/api/websocket?latest’ failed: Error during WebSocket handshake: Unexpected response code: 502
This is how my Caddyfile looks like for this instance:
Thats because you didnt close a quotation mark somewhere. Maybe that last -H with the Origin? Make sure they’re " quotes or single quotes ’ and not the unicode open and end quotes (“”) that I just had to edit out of this post.
Writing it like this in a text editor can help debug long commands:
Both, preferably. So caddy operates on .19 as a reverse proxy to a websocket resource on .3? You can access both things simultaneously? If so, you might be able to just use https://caddyserver.com/docs/http.filter to search for and replace the URL that caddy is not proxying properly with the .19 address equivalent and skip the middleman as it were.
This would only work while you’re inside your network of course, if you were planning on accessing this from the internet via caddy as a traditional reverse-proxy well we’d have to find out whats wrong.