45 lines
803 B
Caddyfile
45 lines
803 B
Caddyfile
{
|
|
# Global options
|
|
auto_https off
|
|
}
|
|
|
|
:80 {
|
|
# Serve static frontend files
|
|
root * /srv
|
|
file_server
|
|
|
|
# Proxy API calls to backend Flask
|
|
handle_path /api/* {
|
|
reverse_proxy backend:8000 {
|
|
header_up Host {host}
|
|
header_up X-Real-IP {remote}
|
|
header_up X-Forwarded-For {remote}
|
|
header_up X-Forwarded-Proto {scheme}
|
|
}
|
|
}
|
|
|
|
# Proxy OAuth routes
|
|
handle_path /login {
|
|
reverse_proxy backend:8000
|
|
}
|
|
|
|
handle_path /oauth/callback {
|
|
reverse_proxy backend:8000
|
|
}
|
|
|
|
handle_path /auth/* {
|
|
root * /srv/auth
|
|
file_server
|
|
}
|
|
|
|
handle_path /health {
|
|
reverse_proxy backend:8000
|
|
}
|
|
|
|
handle_path /admin/* {
|
|
root * /srv/admin
|
|
file_server
|
|
}
|
|
|
|
}
|