We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 17e1ac1 commit 834ebbfCopy full SHA for 834ebbf
1 file changed
caddy/Caddyfile
@@ -12,6 +12,11 @@
12
max_size 10MB
13
}
14
15
+ @download {
16
+ path /media/*
17
+ query treat_as_download=true
18
+ }
19
+
20
@isStatic {
21
path /static/* /media/*
22
@@ -28,6 +33,11 @@
28
33
Access-Control-Request-Methods "GET"
29
34
Access-Control-Allow-Headers Content-Type
30
35
36
37
+ # Allow website to have download feature for files which browser can open (eg: json)
38
+ header @download {
39
+ Content-Disposition "attachment; filename={http.request.uri.path.file}"
40
31
41
32
42
43
0 commit comments