Skip to content

Commit

Permalink
removing restrictions on testing due to dynamic url
Browse files Browse the repository at this point in the history
  • Loading branch information
youssef-attia authored and erwinmombay committed Jul 26, 2023
1 parent 33edba1 commit ad9e8ed
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/web-worker/amp-worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,9 @@ class AmpWorker {
// Only allow the correct webworker url to pass through
const regexURL =
/^https:\/\/([a-zA-Z0-9_-]+\.)?cdn\.ampproject\.org(\/.*)?$/;
const testRegexURL =
/^((([a-zA-Z0-9_-]+\.)?localhost)|0.0.0.0|127.0.0.1|192.168.192.3|172.28.0.3)$/;

if (
(regexURL.test(url) ||
(getMode().test && testRegexURL.test(new URL(url).hostname))) &&
(regexURL.test(url) || getMode().test) &&
(url.slice(-5) === 'ww.js' || url.slice(-9) === 'ww.min.js')
) {
return url;
Expand Down

0 comments on commit ad9e8ed

Please sign in to comment.