From c88dcf2b12ff27594a72c54f177a4d0c23d04ef5 Mon Sep 17 00:00:00 2001 From: Rien Maertens Date: Wed, 8 Aug 2018 14:18:34 +0200 Subject: [PATCH] Remove runtime header, properly --- config/environments/production.rb | 1 - config/initializers/remove_runtime_header.rb | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 config/initializers/remove_runtime_header.rb diff --git a/config/environments/production.rb b/config/environments/production.rb index a645a19..0b109ef 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -82,5 +82,4 @@ Rails.application.configure do config.x.host = 'tab.zeus.gent' config.api_url = "https://tab.zeus.gent/" - config.middleware.delete(Rack::Runtime) end diff --git a/config/initializers/remove_runtime_header.rb b/config/initializers/remove_runtime_header.rb new file mode 100644 index 0000000..04aea02 --- /dev/null +++ b/config/initializers/remove_runtime_header.rb @@ -0,0 +1,3 @@ +if Rails.env.production? + Rails.application.config.middleware.delete(Rack::Runtime) +end