Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions caddy/Caddyfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@
max_size 10MB
}

@download {
path /media/*
query treat_as_download=true
}

@isStatic {
path /static/* /media/*
}
Expand All @@ -28,6 +33,11 @@
Access-Control-Request-Methods "GET"
Access-Control-Allow-Headers Content-Type
}

# Allow website to have download feature for files which browser can open (eg: json)
header @download {
Content-Disposition "attachment; filename={http.request.uri.path.file}"
}
}


Expand Down
Loading