This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resolver 8.8.8.8; | |
location /video/ { | |
if ($request_uri ~ "^/video/(.+?)/.+") { | |
set $upstream_host $1.googlevideo.com; | |
add_header Content-Disposition "attachment; filename=video.mp4;"; | |
} | |
rewrite /video/.+?/(.+)$ /$1 break; | |
proxy_buffering off; | |
proxy_pass https://$upstream_host; | |
proxy_set_header Host $upstream_host; |