From e19161ac3e2a2e6abdb4f04b8a5e1c8445c8b5de Mon Sep 17 00:00:00 2001 From: Jason Barry Date: Thu, 24 Aug 2023 15:10:57 -0700 Subject: [PATCH] fix: join excluded extensions into one regex instead of spreading into multiple regexes --- src/__csp-nonce.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/__csp-nonce.ts b/src/__csp-nonce.ts index 9cbd0e5..d785417 100644 --- a/src/__csp-nonce.ts +++ b/src/__csp-nonce.ts @@ -175,7 +175,7 @@ export const config: Config = { excludedPath: [ ...params.excludedPath, "/.netlify/*", - ...excludedExtensions.map((ext) => `**/*.${ext}`), + `**/*.(${excludedExtensions.join("|")})`, ], handler, onError: "bypass",