fix: ignore .woff2 and modern static-asset extensions#4
Merged
Merged
Conversation
The static-asset ignore list predates woff2 and other modern web formats. Because matching is suffix-based (EndsWith on the lowercased path), '.woff' does not cover '.woff2', so bot requests for woff2 fonts were proxied to the Prerender service instead of passing through. Verified live on prerender.io itself: Googlebot requesting inter-*.woff2 received a 504 while a normal UA received a 200 (.css/.js correctly bypassed). Adds .woff2, .otf, .eot, .webp, .avif and .webmanifest to ExtensionsToIgnore, per integration-contract CONTRACT.md section 3 (prerender/integration-contract#1). The existing case-insensitive suffix matching is already contract-compliant and is kept as is. 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 ignore list (
ExtensionsToIgnore) predates woff2 and other modern web formats. Matching is suffix-based (EndsWithon the lowercased path), so.woffdoes not cover.woff2— bot requests for woff2 fonts were proxied to the Prerender service instead of passing through to the origin.Live evidence
Verified on prerender.io's own site: Googlebot requesting
inter-*.woff2gets a 504 (normal UA: 200), while.css/.jscorrectly bypass the service.Coordinated propagation
This propagates the canonical contract change from prerender/integration-contract#1, which adds
.woff2 .otf .eot .webp .avif .webmanifestto the static-asset ignore list (CONTRACT.md §3, case-insensitive suffix matching).Changes
PrerenderMiddleware.cs: added.woff2,.otf,.eot,.webp,.avif,.webmanifesttoExtensionsToIgnore. The existing matching (ToLowerInvariant()+EndsWith) is already contract-compliant (case-insensitive suffix) and is unchanged.tests/PrerenderMiddlewareTests.cs: addedBotRequest_FontAsset_PassesThroughusing/fonts/inter.woff2, mirroringBotRequest_StaticAsset_PassesThrough.Note:
dotnetis not available on the machine that authored this change, so the test suite was not run locally — relying on CI to execute it.🤖 Generated with Claude Code