Verified Commit ccb97bf9 authored by Lukas Schauer's avatar Lukas Schauer 🔓
Browse files

use pretty filenames for downloads instead of naming everything by course and video id

parent de2acd64
......@@ -64,7 +64,12 @@ location ~ ^/(?<lecture>[0-9]+)/(?<video>[0-9]+)/(?<file>[^/]+)$ {
add_header 'Access-Control-Allow-Credentials' 'true';
add_header 'Access-Control-Allow-Methods' 'GET, HEAD, OPTIONS';
add_header "X-Cache-Status" "$upstream_cache_status";
add_header "Content-Disposition" "attachment; filename=${lecture}_${video}_${file}";
if ($arg_filename ~* .+) {
add_header "Content-Disposition" "attachment; filename=${arg_filename}";
if ($arg_filename !~* .+) {
add_header "Content-Disposition" "attachment; filename=${lecture}_${video}_${file}";
proxy_cache_key "$scheme$proxy_host$uri";
proxy_set_header Authorization "Basic {{ ('cdn:' + videoportal_cdn_password) | b64encode }}";
Subproject commit 70e9500c93dfbdb9bcd34678c6d85f2825e6f200
Subproject commit 29221fb71d80409d031d823be5640eb7ac8fd37d
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment