I am serving a quasar/vuejs spa. When a user is on any route (url) and they refresh the browser the entire the root layout page is loaded and I direct them back to the home page instead. I do this cause a browser refresh is a call to load all the data from multiple web sockets. This works great in the quasar dev server but when I serve from caddy I am thinking that caddy (given my stanza below) thinks this is just a static site (ie. root directive) and thus reloads the “static” page url which throws a 404.
Is there a way to make caddy behave like my dev server? reload the root on browser reload no matter the current url/route? some spa aware directive instead of root?
(worse case I think I can force this using window beforeunload event to change the route back to /. I would have to add this to every route/page via a mixin. I’d rather not).
using Caddy v1
https://lights.xxxx.net {
import wildcard_cert
root /mnt/data/webs/lights-frontend
proxy /socket.io http://10.0.0.115:3031 {
websocket
transparent
}
}