Add enabled flag to the public file server settings. #22173

Merged
merged 2 commits into from Nov 4, 2015

Conversation

Projects
None yet
3 participants
@kaspth
Member

kaspth commented Nov 3, 2015

As discussed in #19135 (comment).

Replaces serve_static_files to unify the static options under the public_file_server wing.

Deprecates serve_static_files accessors, but make them use the newer config internally.

Add enabled flag to the public file server.
As discussed in #19135 (comment).

Replaces `serve_static_files` to unify the static options under the `public_file_server` wing.

Deprecates `serve_static_files` accessors, but make them use the newer config internally.
@rafaelfranca

This comment has been minimized.

Show comment
Hide comment
Member

rafaelfranca commented Nov 3, 2015

:shipit:

@kaspth

This comment has been minimized.

Show comment
Hide comment
@kaspth

kaspth Nov 3, 2015

Member

Sweet! Will ship it in the morning, don't want to accidentally leave the build broken overnight 😁

Also planning of pulling over one of the original changelog entries to Railties: #19135 (comment)

Member

kaspth commented Nov 3, 2015

Sweet! Will ship it in the morning, don't want to accidentally leave the build broken overnight 😁

Also planning of pulling over one of the original changelog entries to Railties: #19135 (comment)

@schneems

This comment has been minimized.

Show comment
Hide comment
@schneems

schneems Nov 3, 2015

Member

Since we've got 3 different flags for this now. Can we make a different flag for assuming the public folder won't change after boot so we can effectively cache all files at start up and not have to hit disk on every request?

Member

schneems commented Nov 3, 2015

Since we've got 3 different flags for this now. Can we make a different flag for assuming the public folder won't change after boot so we can effectively cache all files at start up and not have to hit disk on every request?

Move `static_cache_contorl` deprecation changelog entry to Railties.
The configuration for `config.static_cache_control`, and its replacement
`config.public_file_server.headers` are implemented in Railties.

People would configure this in environment files, which is Railties domain too.

kaspth added a commit that referenced this pull request Nov 4, 2015

Merge pull request #22173 from kaspth/enable-public-file-server
Add enabled flag to the public file server settings.

@kaspth kaspth merged commit 7b471db into rails:master Nov 4, 2015

1 check was pending

continuous-integration/travis-ci/pr The Travis CI build is in progress
Details

@kaspth kaspth deleted the kaspth:enable-public-file-server branch Nov 4, 2015

@kaspth

This comment has been minimized.

Show comment
Hide comment
@kaspth

kaspth Nov 4, 2015

Member

@schneems yeah, that sounds cool!

Could add an eager_load option to config.public_file_server, which just mimics config.eager_load by default.

Member

kaspth commented Nov 4, 2015

@schneems yeah, that sounds cool!

Could add an eager_load option to config.public_file_server, which just mimics config.eager_load by default.

@rafaelfranca rafaelfranca modified the milestones: 5.0.0 [temp], 5.0.0 Dec 30, 2015

@jayfredlund jayfredlund referenced this pull request in MiniProfiler/rack-mini-profiler Jan 29, 2016

Closed

Rails 5 `serve_static_assets` deprecation warning #196

shamozhixing pushed a commit to shamozhixing/gitlab-ce that referenced this pull request Aug 23, 2016

Replace static_cache_control and serve_static_files configuration opt…
…ions.

Deprecation of static_cache_control: rails/rails#19135

Deprecation of serve_static_files: rails/rails#22173
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment