Skip to content

fix: ignore modern static-asset extensions#18

Merged
marcin-prerender merged 1 commit into
masterfrom
fix/ignore-woff2-and-modern-static-assets
Jun 12, 2026
Merged

fix: ignore modern static-asset extensions#18
marcin-prerender merged 1 commit into
masterfrom
fix/ignore-woff2-and-modern-static-assets

Conversation

@marcin-prerender

Copy link
Copy Markdown
Contributor

The bug

The map $uri $prerender static-asset ignore regex is missing modern asset extensions (otf, webp, avif, webmanifest). When a crawler requests one of these assets, the request is proxied to the Prerender rendering service, which rejects static assets with a 504 — so the crawler sees a 5xx on an asset that serves 200 for normal users.

Live evidence

Verified against prerender.io's own site: Googlebot UA requesting inter-*.woff2 receives 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 (woff2 and eot were already present here).

Changes

Added otf|webp|avif|webmanifest to the extension alternation in the identical map $uri $prerender block of all three configs:

  • nginx.conf
  • nginx-php/nginx.conf
  • nginx-reverse-proxy/nginx.conf

Caveats

  • The ~* regex is case-insensitive and unanchored, so avi already incidentally covered avif (and doc covers docx, etc.). The explicit entries match the canonical contract list; adding a $ anchor would change matching behavior for URLs that merely contain these substrings, so it is deliberately out of scope for this PR. The flip side of staying unanchored is continued over-matching, e.g. a page URL like /blog/why-we-love-avif is treated as a static asset and never prerendered.
  • No test suite; the nginx binary wasn't available, so the config change was validated visually (single-line regex edit inside an existing map block).

🤖 Generated with Claude Code

Add otf, webp, avif, and webmanifest to the static-asset ignore regex
in the map $uri $prerender block of all three configs (nginx.conf,
nginx-php/nginx.conf, nginx-reverse-proxy/nginx.conf), per the
canonical list in prerender/integration-contract#1. Forwarding these
asset requests to the rendering service surfaces crawler-visible 504s.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@marcin-prerender marcin-prerender merged commit 218f02c into master Jun 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants