I am serving a static folder with NGINX.
Inside that folder I have one particular file that is 60GB, but it is only meant to be read in small chunks, using an HTTP request like the following:
So if a user tries to download the entire file, NGINX should refuse it.
There are someways I see that this could be done, for eg.:
Check if the HTTP request header
Rangeexists and the byte range is less than X.
Check if the requested response payload is less than, for eg., 100MB.
But I don't know how any of these can be implemented within NGINX.