mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2025-12-19 08:15:51 +01:00
Co-authored-by: Anwarul Islam <anwaarulislaam@gmail.com> Co-authored-by: jamesgeorge007 <25279263+jamesgeorge007@users.noreply.github.com>
47 lines
852 B
Caddyfile
47 lines
852 B
Caddyfile
{
|
|
admin off
|
|
persist_config off
|
|
}
|
|
|
|
:{$HOPP_AIO_ALTERNATE_PORT:80} {
|
|
# Serve the `selfhost-web` SPA by default
|
|
root * /site/selfhost-web
|
|
file_server
|
|
|
|
handle_path /admin* {
|
|
root * /site/sh-admin-subpath-access
|
|
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* {
|
|
@mock {
|
|
header_regexp host Host ^[^.]+\.mock\..*$
|
|
}
|
|
|
|
handle @mock {
|
|
rewrite * /mock{uri}
|
|
reverse_proxy localhost:8080
|
|
}
|
|
|
|
handle {
|
|
reverse_proxy localhost:8080
|
|
}
|
|
}
|
|
|
|
# Handle requests under `/desktop-app-server*` path
|
|
handle_path /desktop-app-server* {
|
|
reverse_proxy localhost:3200
|
|
}
|
|
|
|
# Catch-all route for unknown paths, serves `selfhost-web` SPA
|
|
handle {
|
|
root * /site/selfhost-web
|
|
file_server
|
|
try_files {path} /
|
|
}
|
|
}
|