1
Fork 0

caddy: gzip encoding

This commit is contained in:
Motiejus Jakštys 2024-01-28 22:59:17 +02:00
parent 47d1ba611b
commit 389df7965b
1 changed files with 6 additions and 2 deletions

View File

@ -7,8 +7,9 @@ writeTextFile {
name = "e11sync-caddyfile"; name = "e11sync-caddyfile";
text = '' text = ''
@addSlash path /static /blog /contact @addSlash path /static /blog /contact
route @addSlash { route @addSlash {
redir {uri}/ 302 redir {uri}/ 302
} }
header /static/* Cache-Control "public, max-age=31536000, immutable" header /static/* Cache-Control "public, max-age=31536000, immutable"
@ -21,6 +22,9 @@ writeTextFile {
} }
} }
reverse_proxy http://127.0.0.1:${toString backendPort} route {
encode gzip
reverse_proxy http://127.0.0.1:${toString backendPort}
}
''; '';
} }