Skip to content

Commit 0ee0880

Browse files
authored
Merge pull request #335 from AadarshSree/nosniff-bugfix
X-Content-Type-Options header detection is now case insensitive #334
2 parents 2d96771 + 6cca275 commit 0ee0880

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/js/background/setUpWebRequestsListener.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ function checkResponseMIMEType(
2727
// Sniffable MIME types are a violation
2828
if (
2929
response.responseHeaders?.find(header =>
30-
header.name.includes('x-content-type-options'),
30+
header.name.toLowerCase().includes('x-content-type-options'),
3131
)?.value !== 'nosniff'
3232
) {
3333
chrome.tabs.sendMessage(

0 commit comments

Comments
 (0)