Nginx Download MP3 206 Partial Content HTTP Response
garycnew@yahoo.com
nginx-forum at forum.nginx.org
Mon Nov 9 09:45:31 UTC 2020
Francis,
That was it! The subsequent, asynchronous AJAX call was responding with a
Javascript redirect that was remedied using Nginx's sub_filter directive.
location / {
resolver 103.86.99.100;
proxy_bind $server_addr;
proxy_pass https://$host$request_uri;
proxy_redirect https:// http://;
proxy_set_header Accept-Encoding ""; # Needed by sub_filter to
disable gzip compression
sub_filter_types text/javascript text/css text/xml;
sub_filter 'https:' 'http:';
sub_filter_once off;
}
The combination of disabling gzip compression, adding sub_filter_types
text/javascript, and creating sub_filter 'https:' 'http:' rewrote the
protocol of the Javascript redirect.
{"url":"http:\/\/z1.fm\/download\/3298838","isSuccess":1}
Then, I was able to download MP3's by simply clicking the AJAX link.
Hope this helps someone in the future.
Respectfully,
Gary
Posted at Nginx Forum: https://forum.nginx.org/read.php?2,289905,289922#msg-289922
More information about the nginx
mailing list