From 3712aebaee74ffcbb18a0ead23477a16f373c53e Mon Sep 17 00:00:00 2001 From: Ari Timonen Date: Sat, 18 Apr 2020 08:02:03 +0300 Subject: [PATCH] NGINX header only set in prod+staging --- config/application.rb | 4 ---- config/environments/production.rb | 4 ++++ config/environments/staging.rb | 4 ++++ 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/config/application.rb b/config/application.rb index 1a1e7fc..06c0c6b 100644 --- a/config/application.rb +++ b/config/application.rb @@ -45,10 +45,6 @@ module Ensl domain: ENV['MAIL_DOMAIN'] } - # Specifies the header that your server uses for sending files - # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache - config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx - # Use a different logger for distributed setups config.logger = Logger.new(Rails.root.join("log", Rails.env + ".log" ), 5 , 10 * 1024 * 1024) diff --git a/config/environments/production.rb b/config/environments/production.rb index 4b8f1ba..7f0443b 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -39,4 +39,8 @@ Rails.application.configure do # Do not dump schema after migrations. config.active_record.dump_schema_after_migration = false + + # Specifies the header that your server uses for sending files + # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache + config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx end diff --git a/config/environments/staging.rb b/config/environments/staging.rb index 2e77a3a..fcdf944 100644 --- a/config/environments/staging.rb +++ b/config/environments/staging.rb @@ -38,4 +38,8 @@ Rails.application.configure do # Do not dump schema after migrations. config.active_record.dump_schema_after_migration = false + + # Specifies the header that your server uses for sending files + # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache + config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx end