Skip to content

Commit 48a3bf4

Browse files
authored
Merge pull request rails#52653 from skipkayhil/hm-downcase-env-headers
Downcase cache-control in generated env files
2 parents b18ff93 + 67302d8 commit 48a3bf4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

railties/lib/rails/generators/rails/app/templates/config/environments/development.rb.tt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Rails.application.configure do
2424
config.action_controller.perform_caching = true
2525
config.action_controller.enable_fragment_cache_logging = true
2626
<%- end -%>
27-
config.public_file_server.headers = { "Cache-Control" => "public, max-age=#{2.days.to_i}" }
27+
config.public_file_server.headers = { "cache-control" => "public, max-age=#{2.days.to_i}" }
2828
else
2929
config.action_controller.perform_caching = false
3030
end

railties/lib/rails/generators/rails/app/templates/config/environments/test.rb.tt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ Rails.application.configure do
1515
# loading is working properly before deploying your code.
1616
config.eager_load = ENV["CI"].present?
1717

18-
# Configure public file server for tests with Cache-Control for performance.
19-
config.public_file_server.headers = { "Cache-Control" => "public, max-age=3600" }
18+
# Configure public file server for tests with cache-control for performance.
19+
config.public_file_server.headers = { "cache-control" => "public, max-age=3600" }
2020

2121
# Show full error reports and disable caching.
2222
config.consider_all_requests_local = true

0 commit comments

Comments
 (0)