How to set "Cache-Control" headers for Rails Webpacker

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 #rails #rubyonrails #bosnia #programming #tutorials #rubydeveloper #railsdeveloper

Nezir Zahirovic

Freelance software developer Ruby On Rails (4 years) / MCPD .Net / C# / Asp.Net / CSS / SQL / (11 years)

related articles