From 6f73a358f43013a43c55d57f0c7726a6277f62b6 Mon Sep 17 00:00:00 2001 From: Ye Zhihao Date: Sat, 1 Aug 2020 01:30:20 +0800 Subject: httpcaddyfile: Add `compression` to http transport config (#3624) * httpcaddyfile: Add `compression` to http transport config * Add caddyfile adapt test for typical h2c setup --- modules/caddyhttp/reverseproxy/caddyfile.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'modules/caddyhttp/reverseproxy') diff --git a/modules/caddyhttp/reverseproxy/caddyfile.go b/modules/caddyhttp/reverseproxy/caddyfile.go index 1d00cbf..8c3b118 100644 --- a/modules/caddyhttp/reverseproxy/caddyfile.go +++ b/modules/caddyhttp/reverseproxy/caddyfile.go @@ -719,6 +719,14 @@ func (h *HTTPTransport) UnmarshalCaddyfile(d *caddyfile.Dispenser) error { return d.ArgErr() } + case "compression": + if d.NextArg() { + if d.Val() == "off" { + var disable bool + h.Compression = &disable + } + } + default: return d.Errf("unrecognized subdirective %s", d.Val()) } -- cgit v1.2.3