1. Caddy version (caddy version
):
v2
2. How I run Caddy:
/usr/bin/caddy run --environ --config /etc/caddy/Caddyfile
a. System environment:
Amazon Linux2
3. The problem I’m having:
I have next setup:
Caddy → Varnish → Nginx
As caddy cant brotli on-fly but Varnish can store brotli as separate hash i want to modify Accept-Encoding next way:
If Accept-Encoding ~ “br”, then header_up Accept-Encoding “br”
if Accept-Encoding ~ “gzip”, then header_up Accept-Encoding “gzip”
Else header_up Accept-Encoding “*”
And nginx will compress based on Accept-Encoding header, Varnish will cache separately and Caddy will response the way clear for the client.
Is there an option to “if” for header_up based on request header value?
Thanks.