Skip to content

Instantly share code, notes, and snippets.

View rozdemir's full-sized avatar

Ramazan Özdemir rozdemir

  • İstanbul
View GitHub Profile
@rozdemir
rozdemir / worker nginx conf
Created September 27, 2018 05:32 — forked from fqrouter/worker nginx conf
Youtube Reverse Proxy
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;