From 077302aada59a4b3de4f852f98b625a922997541 Mon Sep 17 00:00:00 2001 From: velzie Date: Sat, 31 Aug 2024 18:32:21 -0400 Subject: [PATCH] really dumb csp thingy --- src/shared/rewriters/html.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/shared/rewriters/html.ts b/src/shared/rewriters/html.ts index c05a2d0..5119ce7 100644 --- a/src/shared/rewriters/html.ts +++ b/src/shared/rewriters/html.ts @@ -199,7 +199,9 @@ function traverseParsedHtml(node: any, cookieStore: CookieStore, origin?: URL) { } if (node.name === "meta" && node.attribs["http-equiv"] != undefined) { - if (node.attribs["http-equiv"] === "content-security-policy") { + if ( + node.attribs["http-equiv"].toLowerCase() === "content-security-policy" + ) { node = {}; } else if ( node.attribs["http-equiv"] === "refresh" &&