Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Rails 5 static file serving configuration. #499

Closed
wants to merge 1 commit into from

Conversation

pwnall
Copy link
Contributor

@pwnall pwnall commented Oct 23, 2016

Source documenting the new Rails 5 configuration method: Rails guides -- look for section 4.4.2.3 CDNs and the Cache-Control Header

Thank you for the gem!

config.static_cache_control = CACHE_CONTROL_FIVE_MINUTES
if Rails.version >= '5'
config.public_file_server.headers = {
'Cache-Control' => CACHE_CONTROL_FIVE_MINUTES

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
Put a comma after the last item of a multiline hash.

@seanpdoyle
Copy link
Contributor

@pwnall thanks for opening this pull request!

The code changes look good to me. I'm working on a separate PR to update our CI configuration to allow failures on rails@master.

Once that lands, I'll rebase and merge this.

Thanks again!

@seanpdoyle
Copy link
Contributor

Merged in c2bdeb9.

Thanks!

@seanpdoyle seanpdoyle closed this Oct 24, 2016
@pwnall
Copy link
Contributor Author

pwnall commented Oct 25, 2016

@seanpdoyle Thank you very much for the quick turnaround time, and for the general awesomeness of this gem!

@pwnall pwnall deleted the rails_5_cache branch October 25, 2016 06:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants