aboutsummaryrefslogtreecommitdiffhomepage
path: root/caddytest
diff options
context:
space:
mode:
authorlollipopkit🏳️‍⚧️ <[email protected]>2024-08-05 22:27:45 +0800
committerGitHub <[email protected]>2024-08-05 08:27:45 -0600
commitb1986781740b2b7f546c6ce56496c5cc7145674d (patch)
tree5ba69a0a8634e324bd38ca6d7f2ddee957765b05 /caddytest
parent840094ac65c2c27dbf0be63478d36969a57ce7e0 (diff)
downloadcaddy-b1986781740b2b7f546c6ce56496c5cc7145674d.tar.gz
caddy-b1986781740b2b7f546c6ce56496c5cc7145674d.zip
browse: Customizable default sort options (#6468)
* fileserver: add `sort` options * fix: test * fileserver: check options in `Provison` * fileserver: more obvious err alerts in sort options
Diffstat (limited to 'caddytest')
-rw-r--r--caddytest/integration/caddyfile_adapt/file_server_sort.caddyfiletest36
1 files changed, 36 insertions, 0 deletions
diff --git a/caddytest/integration/caddyfile_adapt/file_server_sort.caddyfiletest b/caddytest/integration/caddyfile_adapt/file_server_sort.caddyfiletest
new file mode 100644
index 000000000..62bfd0cba
--- /dev/null
+++ b/caddytest/integration/caddyfile_adapt/file_server_sort.caddyfiletest
@@ -0,0 +1,36 @@
+:80
+
+file_server browse {
+ sort size desc
+}
+----------
+{
+ "apps": {
+ "http": {
+ "servers": {
+ "srv0": {
+ "listen": [
+ ":80"
+ ],
+ "routes": [
+ {
+ "handle": [
+ {
+ "browse": {},
+ "handler": "file_server",
+ "hide": [
+ "./Caddyfile"
+ ],
+ "sort": [
+ "size",
+ "desc"
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ }
+ }
+ }
+} \ No newline at end of file