Files
wedding-site/docker/caddy/conf/Caddyfile
MH.Dmitrii 76c3dd4e2a
All checks were successful
Build Docker / deploy (push) Successful in 43s
Build Docker / build (push) Successful in 34s
remove music section caddyfile
2026-05-17 17:35:53 +03:00

43 lines
888 B
Caddyfile

http://ru.homyk.space {
redir https://ru.homyk.space{uri} permanent
}
https://ru.homyk.space {
encode gzip
handle /api/* {
reverse_proxy backend:{$PORT}
}
handle_path /main/* {
@images path_regexp \.(jpg|jpeg|png|webp|gif|svg)$
header @images Cache-Control "public, max-age=604800"
forward_auth backend:{$PORT} {
uri /api/verify
copy_headers Authorization
}
root * /srv/main
file_server
}
handle_errors {
@unauth expression {http.error.status_code} == 401
redir @unauth / 302
}
handle {
root * /srv/auth
file_server {
index login.html
}
}
log {
output file /data/logs/caddy.log {
roll_size 5mb
roll_keep 5
roll_keep_for 72h
}
format json
}
}
}