Skip to content

Commit dd428f1

Browse files
Present config.public_file_server.enabled as opt-out
Follow-up to rails#47137. Since `config.public_file_server.enabled` is true by default, this commit changes the `config/environments/production.rb` template to present the setting as an opt-out.
1 parent b897b4c commit dd428f1

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

actionmailbox/test/dummy/config/environments/production.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
# or in config/master.key. This key is used to decrypt credentials (and other encrypted files).
2121
# config.require_master_key = true
2222

23-
# Enable static file serving from the `/public` folder (turn off if using NGINX/Apache for it).
24-
config.public_file_server.enabled = true
23+
# Disable serving static files from `public/`, relying on NGINX/Apache to do so instead.
24+
# config.public_file_server.enabled = false
2525

2626
# Compress CSS using a preprocessor.
2727
# config.assets.css_compressor = :sass

actiontext/test/dummy/config/environments/production.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
# or in config/master.key. This key is used to decrypt credentials (and other encrypted files).
2121
# config.require_master_key = true
2222

23-
# Enable static file serving from the `/public` folder (turn off if using NGINX/Apache for it).
24-
config.public_file_server.enabled = true
23+
# Disable serving static files from `public/`, relying on NGINX/Apache to do so instead.
24+
# config.public_file_server.enabled = false
2525

2626
# Compress CSS using a preprocessor.
2727
# config.assets.css_compressor = :sass

activestorage/test/dummy/config/environments/production.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
# or in config/master.key. This key is used to decrypt credentials (and other encrypted files).
2121
# config.require_master_key = true
2222

23-
# Enable static file serving from the `/public` folder (turn off if using NGINX/Apache for it).
24-
config.public_file_server.enabled = true
23+
# Disable serving static files from `public/`, relying on NGINX/Apache to do so instead.
24+
# config.public_file_server.enabled = false
2525

2626
# Compress CSS using a preprocessor.
2727
# config.assets.css_compressor = :sass

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ Rails.application.configure do
2222
# key such as config/credentials/production.key. This key is used to decrypt credentials (and other encrypted files).
2323
# config.require_master_key = true
2424

25-
# Enable static file serving from the `/public` folder (turn off if using NGINX/Apache for it).
26-
config.public_file_server.enabled = true
25+
# Disable serving static files from `public/`, relying on NGINX/Apache to do so instead.
26+
# config.public_file_server.enabled = false
2727

2828
<%- unless skip_sprockets? -%>
2929
# Compress CSS using a preprocessor.

0 commit comments

Comments
 (0)