Skip to content

Commit 9f3fe4e

Browse files
author
Jason Barry
authored
fix: add optional (#33)
1 parent da41dad commit 9f3fe4e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/__csp-nonce.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const handler = async (request: Request, context: Context) => {
3232
request.headers.get("accept")?.startsWith("text/html") || isCurl;
3333
const isHTMLResponse = response.headers
3434
.get("content-type")
35-
.startsWith("text/html");
35+
?.startsWith("text/html");
3636
const shouldTransformResponse = isGET && isHTMLRequest && isHTMLResponse;
3737
if (!shouldTransformResponse) {
3838
// @ts-expect-error

0 commit comments

Comments
 (0)