Skip to content

Commit 7ca47c2

Browse files
authored
Merge pull request bhollis#195 from dancrumb/patch-1
Update JSON MIME-type detection
2 parents 06d5c00 + 8a238a2 commit 7ca47c2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/background.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { safeStringEncodeNums } from './safe-encode-numbers';
1010

1111
// Look for JSON if the content type is "application/json",
1212
// or "application/whatever+json" or "application/json; charset=utf-8"
13-
const jsonContentType = /^application\/([a-z.]+\+)?json($|;)/;
13+
const jsonContentType = /^application\/(\w!#$&\.-\^\+)?json($|;)/;
1414

1515
// Keep track globally of URLs that contain JSON content.
1616
const jsonUrls = new Set<string>();

0 commit comments

Comments
 (0)