Skip to content

Instantly share code, notes, and snippets.

@wader
Created July 7, 2020 09:22
Show Gist options
  • Save wader/124719297213eeef5e97372488ce3d18 to your computer and use it in GitHub Desktop.
Save wader/124719297213eeef5e97372488ce3d18 to your computer and use it in GitHub Desktop.
caddy spa srv reverse proxy
{
debug
}
:80
route /api/* {
uri strip_prefix /api
reverse_proxy srv+http://services
}
root * /spa/root
route /* {
# always redirect non existing files to index.html for the SPA
try_files {path} /index.html
file_server /*
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment