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 #rubydeveloper #rubyonrails #webpacker https://rubyonrails.ba/single/how-to-set-cache-control-headers-for-rails-webpacker

Nezir Zahirovic

Contractor Ruby On Rails (8+ years) / MCPD .Net / C# / Asp.Net / CSS / SQL / (11 years)

related articles