[IMP]Caddy common snippets

This commit is contained in:
Fabien BOURGEOIS 2022-02-21 14:35:06 +01:00
parent c2d7794835
commit 1caf81cf57
2 changed files with 21 additions and 0 deletions

View File

@ -6,3 +6,5 @@ RUN xcaddy build \
FROM caddy:2
COPY --from=builder /usr/bin/caddy /usr/bin/caddy
COPY common /caddycommon

19
caddy/common Normal file
View File

@ -0,0 +1,19 @@
# Common snippets
(global) {
grace_period 5s
log http.log.access {
include http.log.access
output stdout
level INFO
format formatted "[{ts}] {request>remote_addr} {request>headers>X-Forwarded-For} {request>method} {request>host}{request>uri} {status} {request>headers>User-Agent} {request>headers>Referer}" {
time_format "02/Jan/2006:15:04:05-0700"
}
}
}
(odoo) {
reverse_proxy {args.0}:8069
reverse_proxy /longpolling/* {args.0}:8072
encode zstd gzip
}