Permalink
Browse files

add cache_control and set to serve static assets

  • Loading branch information...
1 parent 002418f commit 9ac37c6deab19a343f71354187423eb7ad46c44c @schneems schneems committed Mar 13, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 config/environments/production.rb
@@ -8,8 +8,7 @@
config.consider_all_requests_local = false
config.action_controller.perform_caching = true
- # Disable Rails's static asset server (Apache or nginx will already do this)
- config.serve_static_assets = false
+ config.serve_static_assets = true
# Compress JavaScripts and CSS
config.assets.compress = true
@@ -20,6 +19,8 @@
# Generate digests for assets URLs
config.assets.digest = true
+ config.static_cache_control = "public, max-age=2592000"
+
# Defaults to Rails.root.join("public/assets")
# config.assets.manifest = YOUR_PATH

0 comments on commit 9ac37c6

Please sign in to comment.