Welcome! Log In Create A New Profile

Advanced

How to enable byte range request for proxy cache files

Posted by abstrusepersonage 
How to enable byte range request for proxy cache files
July 15, 2012 11:52AM
I have setup a proxy cache that points to a Rails backend that communicate with MongoDB GridFS to read files stored in that database.
Yesterday, I tried to serve mp4 file. It won't load on iPhone. After further research, apparently mobile safari requires the web server to support byte range request on the video file.

I have checked that for static files, the byte range request works. But somehow it doesn't work for files from proxy cache.
Is there a specific setting to enable this feature?
Re: How to enable byte range request for proxy cache files
November 29, 2012 02:30AM
This seems to work once the file is stored in the proxy_cache. Have you found a solution for this problem?
Re: How to enable byte range request for proxy cache files
March 01, 2013 03:18AM
abstrusepersonage Wrote:
-------------------------------------------------------
> I have checked that for static files, the byte range request works.
> But somehow it doesn't work for files from proxy cache.
> Is there a specific setting to enable this feature?


You need to make your backend return 'Accept-Ranges: bytes' header to nginx.

Without it nginx won't allow byte range requests for proxy_cache.

Took me awhile to figure it out, hopefully this post will save someone else's time.



Edited 3 time(s). Last edit at 03/01/2013 03:22AM by Dragon.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 160
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready