I need to send a file stored in S3 through my rails application hosted on heroku. I cannot use the redirection to the URL of the file in S3 , because I want to send a Sitemap that must be sent from the same domain as the links inside.
Ideally, I would use some kind of proxy method to send the file using the rails application, at least I can download the file in the tmp heroku directory and send it after.
I would also send the correct content type for the file.
Do you know how I can achieve this? What would be the best way?
There is a rack application that does this, but I'm not sure how to reproduce it in Rails, see the code here
thanks for the help
Adrien coquio
source share