FR-766: Cache static files and lengthen audit tool title tag - #97
Merged
Conversation
mateusdeap
approved these changes
Jul 28, 2026
The layout picked titles by controller_name, so every non-gemfiles page, including /home/privacy, got the homepage title and description. Each view now declares its own, with the homepage values as the layout fallback.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
IMPORTANT: please be descriptive and provide all required information. Make sure you provide all the information needed for others to review your PR. On sections marked “if applicable”, if that section is not applicable make sure to delete it. Additionally, if your PR closes any open GitHub issues, make sure you include Closes #XXXX in your comment or use the option on the PR's sidebar to add related issues to auto-close the issue that your PR fixes.
What is this PR:
Description:
SEMrush (crawl of 2026-07-23) flagged two isolated issues on audit.fastruby.io:
application.js/application.cssserved uncached, and a title tag that's too short.The cache one is the same bug fastruby.io had in
[ba737afb](https://github.com/ombulabs/fastruby.io/commit/ba737afb)(which itself mirrored OMBU-786 on ombulabs.com): production setspublic_file_server.enabledbut never setspublic_file_server.headers, so everything underpublic/goes out with onlyLast-Modifiedand noCache-Control. Crawlers read that as uncached.config.public_file_server.headerswithpublic, max-age=#{1.week.to_i}inconfig/environments/production.rbAudit Tool(10 chars) toFree Gemfile.lock Vulnerability Scanner | FastRuby.io(53 chars)| FastRuby.iosuffix convention and stays under the 60-char ceiling fastruby.io's linter enforces. Still differs from the<h1>("Gemfile.lock Audit Tool"), so no duplicate H1/title.Screenshots:
If changes to the UI are made, please include screenshots of the before and after.
Related story:
FR-766: Fix uncached JS/CSS and short title tag on audit.fastruby.io
Related links (if applicable):
Link to any related issues.
How has this been tested?
What manual tests have been run?
Development
The header only shows up in production mode with static serving on, so dev mode won't prove anything:
Get a digest:
ls public/assets/application-*.cssLet's check the header:
it must be
# => cache-control: public, max-age=604800Check the title:
curl -s -H 'X-Forwarded-Proto: https' http://localhost:3010/ | grep -o '<title>.*</title>'Remember to clean up:
rm -rf public/assets. it isn't in.gitignore, so it'll otherwise sit there as untrackedProduction
curl -Iit — should now includecache-control: public, max-age=604800Free Gemfile.lock Vulnerability Scanner | FastRuby.ioWhat browsers did you test it on (if applicable)?
What devices did you test it on (if applicable)?