Files
hoppscotch/aio.Caddyfile

41 lines
887 B
Caddyfile

# TODO: Uncomment the below lines and update the subpath-based implementation to use standard HTTP/HTTPS ports
# :3000 {
# try_files {path} /
# root * /site/selfhost-web
# file_server
# }
# :3100 {
# try_files {path} /
# root * /site/sh-admin
# file_server
# }
:3000 {
# Serve the `selfhost-web` SPA by default
root * /site/selfhost-web
file_server
# Handle requests under `/admin*`
handle_path /admin* {
root * /site/sh-admin
file_server
# Ensures any non-existent file in the server is routed to the SPA
try_files {path} /
}
# Handle requests under `/backend*` path
handle_path /backend* {
reverse_proxy localhost:3170
}
# Catch-all route for unknown paths, serves `selfhost-web` SPA
handle {
root * /site/selfhost-web
file_server
try_files {path} /
}
}