Repository navigation
fix(web): cache mailhooks.cc's robots.txt for four hours, not a year (web 0.62.4) - #616
Merged
Merged
Conversation
…(web 0.62.4) The route is static and set no Cache-Control, so Next sent s-maxage=31536000, and because the proxy skips robots.txt nothing replaced it. Cloudflare kept serving a copy from two days earlier after the 0.62.3 deploy added Sitemap lines. It now sends max-age=14400, like webhooks.cc's robots.txt. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
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.
Why
After the 0.62.3 deploy,
https://mailhooks.cc/robots.txtstill served the old file from Cloudflare (cf-cache-status: HIT,ageover two days), while the origin had the new one. The route isforce-staticand sets noCache-Control, so Next sendss-maxage=31536000, and the proxy, which sets headers on the other static routes, skips robots.txt. Cloudflare honours that for a year.What
Cache-Control: public, max-age=14400, the same as webhooks.cc's robots.txt.https://mailhooks.cc/robots.txt.Checks
lib/changelog.test.tsand the sitemap tests pass; prettier clean.curl -sI https://mailhooks.cc/robots.txtshowsmax-age=14400and the fourSitemap:lines.🤖 Generated with Claude Code