location ~* ^/dl/(.+)/(.+) $ { # ^ ^ # idfile namafile # contoh /dl/1GZP2JydtrwbPIa0Xr4NxuK3qpjBhDpqT/anime.zip # untuk mengatasi not resolved pas get api resolver 8.8.4.4; access_log /var/log/nginx/google_drive.access.log; error_log /var/log/nginx/google_drive.error.log; set $download_id $1; set $filename $2; # api google drive set $key ''; set $download_url https://www.googleapis.com/drive/v3/files/$download_id?alt=media&supportsTeamDrives=true&key=$key; proxy_hide_header Content-Disposition; add_header Content-Disposition 'attachment; filename="$filename"'; # set temp size 0 untuk mengatasi proxy membuat cache proxy_max_temp_file_size 0; proxy_pass $download_url; } }