Skip to content

Commit

Permalink
update RegExp
Browse files Browse the repository at this point in the history
  • Loading branch information
seadfeng committed Aug 6, 2024
1 parent 762768a commit 6fe67e7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Disallow: /
const contentType = response.headers.get('content-type');

// Check if the 'content-type' exists and matches JavaScript or any text/* types (e.g., text/html, text/xml)
if (contentType && ( /^(application\/x\-javascript|text\/)/i.test(contentType))) {
if (contentType && ( /^(application\/x-javascript|text\/)/i.test(contentType))) {
let text = new TextDecoder('utf-8').decode(body);

// Replace all instances of the proxy site domain with the current host domain in the text
Expand Down
2 changes: 1 addition & 1 deletion workers.dev/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Disallow: /
const contentType = response.headers.get('content-type');

// Check if the 'content-type' exists and matches JavaScript or any text/* types (e.g., text/html, text/xml)
if (contentType && ( /^(application\/x\-javascript|text\/)/i.test(contentType))) {
if (contentType && ( /^(application\/x-javascript|text\/)/i.test(contentType))) {
let text = new TextDecoder('utf-8').decode(body);

// Replace all instances of the proxy site domain with the current host domain in the text
Expand Down

0 comments on commit 6fe67e7

Please sign in to comment.