From 513c252fec68c0073e537d1952d90394ec8c401e Mon Sep 17 00:00:00 2001 From: Zog Date: Tue, 17 Apr 2018 16:53:54 +0200 Subject: Refs #5896; Move our custom middleware up in the stack This will ensure it is used even for static files --- config/environments/development.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'config/environments/development.rb') diff --git a/config/environments/development.rb b/config/environments/development.rb index 7bd049979..d08077769 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -96,9 +96,11 @@ Rails.application.configure do config.i18n.available_locales = [:fr, :en] + config.serve_static_files = true + config.middleware.insert_after(ActionDispatch::Static, Rack::LiveReload) if ENV['LIVERELOAD'] config.middleware.use I18n::JS::Middleware - config.middleware.use CacheSettings, { + config.middleware.insert_before ActionDispatch::Static, CacheSettings, { /\/assets\/.*/ => { cache_control: "max-age=86400, public", expires: 86400 -- cgit v1.2.3