Skip to content
Snippets Groups Projects
Unverified Commit 3925e927 authored by Felix Eckhofer's avatar Felix Eckhofer :man_dancing:
Browse files

Add cache control headers for assets

parent 1cc7dbfa
No related branches found
No related tags found
No related merge requests found
......@@ -23,6 +23,12 @@ Rails.application.configure do
# Disable serving static files from `public/`, relying on NGINX/Apache to do so instead.
# config.public_file_server.enabled = false
# Set cache headers for static files
config.public_file_server.headers = {
'Cache-Control' => 'public, max-age=31536000',
'Expires' => 1.year.from_now.to_formatted_s(:rfc822)
}
# Compress CSS using a preprocessor.
# config.assets.css_compressor = :sass
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment