From 90a7bb1ae0b708423299c49397c7b096e7954d1d Mon Sep 17 00:00:00 2001 From: Petrik Date: Thu, 9 Jan 2025 10:22:17 +0100 Subject: [PATCH] [rails] Reduce headers to required headers only. +----------------------+-------+--------------+ | branch_name|fortune|weighted_score| +----------------------+-------+--------------+ | master| 14884| 60| |reduce-default-headers| 15730| 64| +----------------------+-------+--------------+ --- frameworks/Ruby/rails/config/application.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frameworks/Ruby/rails/config/application.rb b/frameworks/Ruby/rails/config/application.rb index d6be2b4b4e4..963357fb4e6 100644 --- a/frameworks/Ruby/rails/config/application.rb +++ b/frameworks/Ruby/rails/config/application.rb @@ -28,7 +28,8 @@ class Application < Rails::Application # Common ones are `templates`, `generators`, or `middleware`, for example. config.autoload_lib(ignore: %w[assets tasks]) - config.action_dispatch.default_headers.merge!('Server' => 'WebServer') + # Only use headers required by TechEmpower. + config.action_dispatch.default_headers = {'Server' => 'Rails'} config.api_only = true