How to use Nginx X-Accel-Redirect to proxy remote files?


#1

I want to use a proxy to be able to collect statistics on files and don’t want to expose direct urls to the files.
And then be able to go to another service without changing the original url
Now I’m using Cloudinary and the file path looks like this:

<%= cl_video_tag("dog") %>
=> https://res.cloudinary.com/demo/video/upload/dog.mp4

#2

Hello @ipatovanton,

I would suggest to check this blog post:
https://antrg.com/blog/2014/2/6/nginx-ruby-auth/

Good luck!