Files
Snip/Caddyfile
T
2026-06-15 21:25:57 +07:00

29 lines
720 B
Caddyfile

# Gateway routing for the three snip services.
# Path ownership (matches the app's reserved paths):
# /api/* -> api service
# /, /login, /dashboard -> frontend (SPA shell)
# /assets/*, /favicon.svg -> frontend (static)
# everything else (/{code}) -> redirect service
:80 {
encode gzip
handle /api/* {
reverse_proxy api:8080
}
# SPA app routes + static assets are owned by the frontend service.
handle /assets/* {
reverse_proxy frontend:8081
}
@app path / /login /dashboard /favicon.svg /favicon_dark.svg /robots.txt
handle @app {
reverse_proxy frontend:8081
}
# Anything else is a short code → redirect service.
handle {
reverse_proxy redirect:8082
}
}