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

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

Hello @ipatovanton,

I would suggest to check this blog post:

Good luck!

Hello, Here is the article which will definitely help you with your doubt:

https://kovyrin.net/2010/07/24/nginx-fu-x-accel-redirect-remote/