fix: ignore .woff2 and modern static-asset extensions#4
Open
marcin-prerender wants to merge 1 commit into
Open
fix: ignore .woff2 and modern static-asset extensions#4marcin-prerender wants to merge 1 commit into
marcin-prerender wants to merge 1 commit into
Conversation
The IGNORE_EXTENSIONS blocklists predate woff2. Suffix matching is exact on the final extension, so ".woff" does not cover ".woff2" — verified live: Googlebot requesting prerender.io's own inter-*.woff2 got a 504 (normal UA: 200) while .css/.js correctly bypassed. Adds .woff2, .otf, .eot, .webp, .avif to both workers per the integration contract (prerender/integration-contract#1), and removes the duplicate ".doc" entry in worker-subscriber.js. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
OpsBeaconCharles
approved these changes
Jun 12, 2026
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.
The bug
Both workers'
IGNORE_EXTENSIONSblocklists predate woff2. The filter does exact, case-insensitive matching on the final extension, so.woffdoes not cover.woff2. Bot requests for.woff2(and.otf,.eot,.webp,.avif) fonts/images were therefore routed toservice.prerender.ioinstead of being served directly — wasting renders and breaking asset delivery for crawlers.Live evidence
Verified against prerender.io itself: a Googlebot-UA request for
inter-*.woff2returns a 504 (normal UA: 200), while.css/.jscorrectly bypass Prerender and return 200 for both UAs.Contract
Canonical change to the static-asset ignore list: prerender/integration-contract#1 — the contract list (case-insensitive suffix matching) now includes
.woff2 .otf .eot .webp .avif .webmanifest.Changes
worker-subscriber.js: added.woff2,.otf,.eot,.webp,.aviftoIGNORE_EXTENSIONS; removed the duplicate.docentry (.webmanifestwas already present).worker-custom-domain.js: added the same five extensions.No logic changes; both workers already lowercase the pathname/extension before comparison. Validated with
node --check.🤖 Generated with Claude Code