diff options
author | Francis Lavoie <lavofr@gmail.com> | 2021-05-10 13:12:59 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-10 11:12:59 -0600 |
commit | f5db41ce1d4bb5ac75489f11985ca46898fb642e (patch) | |
tree | d5244c0dee30518741a2c36cf5c8460e2d9391b9 /caddytest/integration | |
parent | 77764714ad83d5c6e4db2da4b8945701f146bad0 (diff) |
encode: Drop `prefer` from Caddyfile (#4156)
Followup to #4150, #4151 /cc @ueffel @polarathene
After a bit of discussion with @mholt, we decided to remove `prefer` as a subdirective and just go with using the order implicitly always. Simpler config, simpler docs, etc.
Effectively changes 7776471 and reverts a small part of f35a7fa.
Diffstat (limited to 'caddytest/integration')
-rw-r--r-- | caddytest/integration/caddyfile_adapt/encode_options.txt | 35 |
1 files changed, 4 insertions, 31 deletions
diff --git a/caddytest/integration/caddyfile_adapt/encode_options.txt b/caddytest/integration/caddyfile_adapt/encode_options.txt index 9459008..6f811ab 100644 --- a/caddytest/integration/caddyfile_adapt/encode_options.txt +++ b/caddytest/integration/caddyfile_adapt/encode_options.txt @@ -3,7 +3,6 @@ # All the options encode gzip zstd { minimum_length 256 - prefer zstd gzip match { status 2xx 4xx 500 header Content-Type text/* @@ -16,18 +15,10 @@ encode gzip zstd { } } -# Prefer list is implied (short way) -encode gzip zstd - -# Prefer list is implied (long way) +# Long way with a block for each encoding encode { - gzip 5 zstd -} - -# Prefer list is turned off -encode gzip zstd { - prefer off + gzip 5 } ---------- { @@ -67,17 +58,6 @@ encode gzip zstd { }, "minimum_length": 256, "prefer": [ - "zstd", - "gzip" - ] - }, - { - "encodings": { - "gzip": {}, - "zstd": {} - }, - "handler": "encode", - "prefer": [ "gzip", "zstd" ] @@ -91,16 +71,9 @@ encode gzip zstd { }, "handler": "encode", "prefer": [ - "gzip", - "zstd" + "zstd", + "gzip" ] - }, - { - "encodings": { - "gzip": {}, - "zstd": {} - }, - "handler": "encode" } ] } |