How to set "Cache-Control" headers for Rails Webpacker
13-Nov-2019 1661
This is because Rails ships with fairly vanilla headers for it's assets, as quite often services like Nginx will override headers provided by the app. However services like Heroku will totally honour the custom header you add in your Ruby on Rails app.To fix this issue, I normally add a file to my config/initializers folder to set sensible headers on all my Rails assets:.
How to set "Cache-Control" headers for Rails Webpacker #ruby #rubydeveloper #rubyonrails #"Cache-Control" #headers #Rails #Webpacker #webpacker https://rubyonrails.ba/link/how-to-set-cache-control-headers-for-rails-webpacker