Skip to content

Commit 7acae3d

Browse files
lpincadarrachequesne
authored andcommitted
[fix] Obfuscate ActiveXObject occurrences (#509)
Some corporate firewalls/proxies such as Blue Coat prevent JavaScript files from being downloaded if they contain the word "ActiveX".
1 parent 6187585 commit 7acae3d

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

lib/xmlhttprequest.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
// browser shim for xmlhttprequest module
22

3-
// Indicate to eslint that ActiveXObject is global
4-
/* global ActiveXObject */
5-
63
var hasCORS = require('has-cors');
74

85
module.exports = function (opts) {
@@ -34,7 +31,7 @@ module.exports = function (opts) {
3431

3532
if (!xdomain) {
3633
try {
37-
return new ActiveXObject('Microsoft.XMLHTTP');
34+
return new global[['Active'].concat('Object').join('X')]('Microsoft.XMLHTTP');
3835
} catch (e) { }
3936
}
4037
};

0 commit comments

Comments
 (0)