Skip to content

Commit 54baa55

Browse files
Merge pull request #584 from matheuswanted/fix/isRemoteUrl-breaking
fix: isRemoteUrl not working on big files sometimes
2 parents 607afb0 + 5308848 commit 54baa55

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib-es5/utils/isRemoteUrl.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ var isString = require('lodash/isString');
88
* @returns {boolean} true if the given url is a remote location or data
99
*/
1010
function isRemoteUrl(url) {
11-
return isString(url) && /^ftp:|^https?:|^gs:|^s3:|^data:([\w-.]+\/[\w-.]+(\+[\w-.]+)?)?(;[\w-.]+=[\w-.]+)*;base64,([a-zA-Z0-9\/+\n=]+)$/.test(url);
11+
return isString(url) && /^ftp:|^https?:|^gs:|^s3:|^data:/.test(url);
1212
}
1313

1414
module.exports = isRemoteUrl;

lib/utils/isRemoteUrl.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const isString = require('lodash/isString');
66
* @returns {boolean} true if the given url is a remote location or data
77
*/
88
function isRemoteUrl(url) {
9-
return isString(url) && /^ftp:|^https?:|^gs:|^s3:|^data:([\w-.]+\/[\w-.]+(\+[\w-.]+)?)?(;[\w-.]+=[\w-.]+)*;base64,([a-zA-Z0-9\/+\n=]+)$/.test(url);
9+
return isString(url) && /^ftp:|^https?:|^gs:|^s3:|^data:/.test(url);
1010
}
1111

1212
module.exports = isRemoteUrl;

0 commit comments

Comments
 (0)