summaryrefslogtreecommitdiff
path: root/caddytest
diff options
context:
space:
mode:
authorFrancis Lavoie <lavofr@gmail.com>2021-05-10 12:06:38 -0400
committerGitHub <noreply@github.com>2021-05-10 10:06:38 -0600
commit77764714ad83d5c6e4db2da4b8945701f146bad0 (patch)
tree80507eaacf82a4a1e1fbe511e6556fac9f08dab8 /caddytest
parent61642b766baaa8cef62f5a7ea3c29d8ebdbd86ea (diff)
encode: Default to order the formats are enabled for `prefer` in Caddyfile (#4151)
Diffstat (limited to 'caddytest')
-rw-r--r--caddytest/integration/caddyfile_adapt/encode_options.txt46
1 files changed, 46 insertions, 0 deletions
diff --git a/caddytest/integration/caddyfile_adapt/encode_options.txt b/caddytest/integration/caddyfile_adapt/encode_options.txt
index a43c7e0..9459008 100644
--- a/caddytest/integration/caddyfile_adapt/encode_options.txt
+++ b/caddytest/integration/caddyfile_adapt/encode_options.txt
@@ -1,5 +1,6 @@
:80
+# All the options
encode gzip zstd {
minimum_length 256
prefer zstd gzip
@@ -14,6 +15,20 @@ encode gzip zstd {
header Content-Type image/svg+xml*
}
}
+
+# Prefer list is implied (short way)
+encode gzip zstd
+
+# Prefer list is implied (long way)
+encode {
+ gzip 5
+ zstd
+}
+
+# Prefer list is turned off
+encode gzip zstd {
+ prefer off
+}
----------
{
"apps": {
@@ -55,6 +70,37 @@ encode gzip zstd {
"zstd",
"gzip"
]
+ },
+ {
+ "encodings": {
+ "gzip": {},
+ "zstd": {}
+ },
+ "handler": "encode",
+ "prefer": [
+ "gzip",
+ "zstd"
+ ]
+ },
+ {
+ "encodings": {
+ "gzip": {
+ "level": 5
+ },
+ "zstd": {}
+ },
+ "handler": "encode",
+ "prefer": [
+ "gzip",
+ "zstd"
+ ]
+ },
+ {
+ "encodings": {
+ "gzip": {},
+ "zstd": {}
+ },
+ "handler": "encode"
}
]
}