Skip to content

Commit

Permalink
[rails] Reduce headers to required headers only.
Browse files Browse the repository at this point in the history
+----------------------+-------+--------------+
|           branch_name|fortune|weighted_score|
+----------------------+-------+--------------+
|                master|  14884|            60|
|reduce-default-headers|  15730|            64|
+----------------------+-------+--------------+
  • Loading branch information
p8 committed Jan 9, 2025
1 parent ddd0952 commit 863908f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion frameworks/Ruby/rails/config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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' => 'WebServer'}

config.api_only = true

Expand Down

0 comments on commit 863908f

Please sign in to comment.