fix: ignore modern static-asset extensions#17
Open
marcin-prerender wants to merge 1 commit into
Open
Conversation
Add .woff2, .otf, .eot, .webp, .avif, and .webmanifest to the static-asset ignore list in the RewriteCond, per the canonical list in prerender/integration-contract#1. Also deduplicate the repeated \.doc entry and add the [NC] flag so uppercase URLs (e.g. /FONT.WOFF) no longer bypass the filter. Forwarding these asset requests to the rendering service surfaces crawler-visible 504s. 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
The static-asset filter in the
RewriteCond %{REQUEST_URI}negative lookahead is missing modern asset extensions. When a crawler requests a font or modern image format, the request is forwarded to the Prerender rendering service, which rejects static assets with a 504 — so the crawler sees a 5xx on an asset that serves200for normal users.Live evidence
Verified against prerender.io's own site: Googlebot UA requesting
inter-*.woff2receives 504, while a normal UA receives 200. Any forwarded font/image request surfaces as a crawler-visible 5xx.Canonical reference
This propagates the canonical static-asset ignore list from prerender/integration-contract#1, which adds
.woff2 .otf .eot .webp .avif .webmanifest.Changes (
.htaccess+ the same snippet inREADME.md)\.woff2,\.otf,\.eot,\.webp,\.avif,\.webmanifestto the extension alternation.\.doc, which appeared twice in the list.[NC]flag to theREQUEST_URIcondition — the user-agent condition above already uses[NC], but this one didn't, so uppercase URLs (e.g./FONT.WOFF) bypassed the filter and were forwarded to the rendering service.Caveats
\.woffalready incidentally covered.woff2and\.avicovered.avif; the new entries make the intent explicit and match the canonical contract list. Anchoring (and the resulting over-matching trade-off, e.g.\.docmatching.docxpaths) is out of scope here.🤖 Generated with Claude Code