On browser reload spa throws 404 on current route instead of reloading root

You’ll want to use a rewrite for this https://caddyserver.com/v1/docs/rewrite

rewrite not /socket.io /

This will rewrite any URL that does not start with /socket.io to /

I strongly recommend using Caddy v2 though, as Caddy v1 is no longer being supported (only security fixes for a certain amount of time)

1 Like