forked from hoppscotch/hoppscotch
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaio-subpath-access.Caddyfile
More file actions
46 lines (38 loc) · 852 Bytes
/
aio-subpath-access.Caddyfile
File metadata and controls
46 lines (38 loc) · 852 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
{
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} /
}
}