1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
git.um9i.dev {
# Browsers that have visited once refuse plain HTTP for a year, so the Secure session
# cookie can't be stripped by a downgrade.
header Strict-Transport-Security "max-age=31536000; includeSubDomains"
# One JSON line per request. Caddy leaves Cookie, Set-Cookie and Authorization values
# out of these logs, so session tokens never reach the disk.
log {
output file /var/log/caddy/gitv-access.log {
roll_size 50MiB
roll_keep 10
roll_keep_for 720h
}
format json
}
# Pages, diffs and source compress well. Caddy's default list of types leaves git packs,
# fonts and images alone, since they are compressed already. The one secret in any page
# (the Account page's form token) shares the page with nothing a visitor can echo into it,
# so compression can't be used to guess it (BREACH).
encode zstd gzip
reverse_proxy 127.0.0.1:8080
}