From dc5931a85b834b1ada1d6a60c729a1bdf65d1061 Mon Sep 17 00:00:00 2001 From: Marcin Date: Thu, 11 Jun 2026 18:42:02 +0100 Subject: [PATCH] fix: ignore .woff2 and modern static-asset extensions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- worker-custom-domain.js | 2 +- worker-subscriber.js | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/worker-custom-domain.js b/worker-custom-domain.js index d35e547..4ffc9c0 100644 --- a/worker-custom-domain.js +++ b/worker-custom-domain.js @@ -14,7 +14,7 @@ const IGNORE_EXTENSIONS = [ ".js", ".css", ".xml", ".less", ".png", ".jpg", ".jpeg", ".gif", ".pdf", ".doc", ".txt", ".ico", ".rss", ".zip", ".mp3", ".rar", ".exe", ".wmv", ".avi", ".ppt", ".mpg", ".mpeg", ".tif", ".wav", ".mov", ".psd", ".ai", ".xls", ".mp4", ".m4a", ".swf", ".dat", ".dmg", ".iso", ".flv", ".m4v", - ".torrent", ".woff", ".ttf", ".svg", ".webmanifest", + ".torrent", ".woff", ".woff2", ".ttf", ".otf", ".eot", ".svg", ".webp", ".avif", ".webmanifest", ]; function isRedirect(status) { diff --git a/worker-subscriber.js b/worker-subscriber.js index dc1524e..07552a6 100644 --- a/worker-subscriber.js +++ b/worker-subscriber.js @@ -31,9 +31,10 @@ const BOT_AGENTS = [ const IGNORE_EXTENSIONS = [ ".js", ".css", ".xml", ".less", ".png", ".jpg", ".jpeg", ".gif", ".pdf", ".doc", ".txt", ".ico", ".rss", ".zip", ".mp3", ".rar", ".exe", ".wmv", - ".doc", ".avi", ".ppt", ".mpg", ".mpeg", ".tif", ".wav", ".mov", ".psd", + ".avi", ".ppt", ".mpg", ".mpeg", ".tif", ".wav", ".mov", ".psd", ".ai", ".xls", ".mp4", ".m4a", ".swf", ".dat", ".dmg", ".iso", ".flv", - ".m4v", ".torrent", ".woff", ".ttf", ".svg", ".webmanifest", + ".m4v", ".torrent", ".woff", ".woff2", ".ttf", ".otf", ".eot", ".svg", + ".webp", ".avif", ".webmanifest", ]; export default {