From fc872f6b8678f109473959f3566a5614d207a86b Mon Sep 17 00:00:00 2001 From: Daniel Van Der Ploeg Date: Thu, 30 May 2024 15:34:44 +0930 Subject: [PATCH] feat: add case insensitive flag --- packages/prerender-proxy/lib/handlers/prerender-check.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/prerender-proxy/lib/handlers/prerender-check.ts b/packages/prerender-proxy/lib/handlers/prerender-check.ts index b9032b8d..440a86bf 100644 --- a/packages/prerender-proxy/lib/handlers/prerender-check.ts +++ b/packages/prerender-proxy/lib/handlers/prerender-check.ts @@ -8,7 +8,7 @@ const IS_FILE = /\.(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|woff|ttf|svg|webmanifest|eot|torrent)$/; // Allow passing a custom bot detection regex string -const IS_BOT_CUSTOM = new RegExp(process.env.CUSTOM_BOT_CHECK || "[]"); +const IS_BOT_CUSTOM = new RegExp(process.env.CUSTOM_BOT_CHECK || "[]", "i"); export const handler = async ( event: CloudFrontRequestEvent