The official bundle and the Unraid override live in the repository, and secrets stay in the stack .env outside the clone.
91 lines
1.6 KiB
Caddyfile
91 lines
1.6 KiB
Caddyfile
{
|
|
servers {
|
|
trusted_proxies static {$FLUXER_EDGE_TRUSTED_PROXIES:private_ranges}
|
|
trusted_proxies_strict
|
|
protocols {$FLUXER_EDGE_PROTOCOLS:h1 h2 h3}
|
|
}
|
|
{$FLUXER_EDGE_GLOBAL_OPTIONS}
|
|
}
|
|
|
|
(upstream) {
|
|
reverse_proxy {args[0]} {
|
|
header_up X-Forwarded-For {client_ip}
|
|
header_up X-Real-IP {client_ip}
|
|
header_up -Forwarded
|
|
}
|
|
}
|
|
|
|
{$FLUXER_EDGE_SITE_ADDRESS} {
|
|
{$FLUXER_EDGE_TLS_DIRECTIVE}
|
|
import /etc/caddy/conf.d/*.caddy
|
|
encode {$FLUXER_EDGE_ENCODE:zstd gzip}
|
|
|
|
handle /_health {
|
|
respond "OK" 200
|
|
}
|
|
|
|
handle /_edge {
|
|
header Cache-Control no-store
|
|
respond "{system.hostname}" 200
|
|
}
|
|
|
|
handle_path /api/* {
|
|
import upstream api:8080
|
|
}
|
|
|
|
handle /gateway {
|
|
rewrite * /
|
|
import upstream gateway:8080
|
|
}
|
|
|
|
handle_path /gateway/* {
|
|
import upstream gateway:8080
|
|
}
|
|
|
|
handle_path /media/* {
|
|
import upstream media-proxy:8080
|
|
}
|
|
|
|
handle_path /livekit/* {
|
|
import upstream livekit:7880
|
|
}
|
|
|
|
handle {$FLUXER_ADMIN_BASE_PATH:/admin} {
|
|
rewrite * /
|
|
import upstream {$FLUXER_ADMIN_UPSTREAM:admin:8080}
|
|
}
|
|
|
|
handle_path {$FLUXER_ADMIN_BASE_PATH:/admin}/* {
|
|
import upstream {$FLUXER_ADMIN_UPSTREAM:admin:8080}
|
|
}
|
|
|
|
@staticAssets path /web/* /emoji/* /libs/* /avatars/* /badges/* /desktop/*
|
|
handle @staticAssets {
|
|
import upstream static-proxy:8080
|
|
}
|
|
|
|
handle /.well-known/fluxer {
|
|
import upstream api:8080
|
|
}
|
|
|
|
handle /.well-known/webfinger {
|
|
import upstream api:8080
|
|
}
|
|
|
|
handle {
|
|
import upstream app-proxy:8080
|
|
}
|
|
}
|
|
|
|
:8088 {
|
|
handle /.well-known/fluxer {
|
|
import upstream api:8080
|
|
}
|
|
|
|
handle /_edge {
|
|
respond "{system.hostname}" 200
|
|
}
|
|
}
|
|
|
|
import /etc/caddy/conf.d/sites/*.caddy
|