41 lines
1 KiB
Text
41 lines
1 KiB
Text
# Kaboot Production Caddyfile
|
|
# Copy this file to Caddyfile and update the domain names
|
|
|
|
kaboot.example.com {
|
|
root * /srv/frontend
|
|
file_server
|
|
try_files {path} /index.html
|
|
|
|
handle /api/* {
|
|
reverse_proxy kaboot-backend:3001
|
|
}
|
|
|
|
handle /health {
|
|
reverse_proxy kaboot-backend:3001
|
|
}
|
|
}
|
|
|
|
auth.example.com {
|
|
@oidc path /application/o/*
|
|
|
|
handle @oidc {
|
|
reverse_proxy authentik-server:9000 {
|
|
header_up X-Forwarded-Proto {scheme}
|
|
header_up X-Forwarded-Host {host}
|
|
header_down -Access-Control-Allow-Origin
|
|
}
|
|
header Access-Control-Allow-Origin "https://kaboot.example.com"
|
|
header Access-Control-Allow-Methods "GET, POST, OPTIONS"
|
|
header Access-Control-Allow-Headers "Content-Type, Authorization"
|
|
}
|
|
|
|
handle {
|
|
reverse_proxy authentik-server:9000 {
|
|
header_up X-Forwarded-Proto {scheme}
|
|
header_up X-Forwarded-Host {host}
|
|
transport http {
|
|
keepalive 30s
|
|
}
|
|
}
|
|
}
|
|
}
|