-1

I have a mp3 file on my amazon cloud drive:

How can I make nginx proxy_pass to play this audio on chrome?

I need to get content range header, then send the content-range header to proxy server.

Configuration:

location /match/here.mp3 {
    proxy_pass https://content-na.drive.amazonaws.com/cdproxy/templink/uIBwvxaYbNEQFB8gUjIgu6h9RjLdu18nKGxterGfh9MFfJttb;
}

And the link is: http://46.101.231.60/match/here.mp3

Simple when I enter this link (http://46.101.231.60/match/here.mp3) on chrome the audio is not playing. How can I fix it?

1
  • You might need to forcibly set the correct mime type so your browser can recognise the content as audio
    – HBruijn
    Aug 14, 2016 at 10:33

1 Answer 1

0

Try this

location /match/here.mp3 {
    try_files @amazon;
}

location @amazon{
#resolver important to resolve the host,google dns
    resolver 8.8.8.8;
    proxy_pass https://content-na.drive.amazonaws.com/cdproxy/templink/uIBwvxaYbNEQFB8gUjIgu6h9RjLdu18nKGxterGfh9MFfJttb;
}

Also check the error log on nginx , maybe that can help

1
  • not worked. with your code I cannot reload or restart nginx Aug 1, 2016 at 18:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .