node-iframe
Advanced tools
Comparing version 1.4.7 to 1.4.8
@@ -66,36 +66,34 @@ "use strict"; | ||
var key = _a.key, attribute = _a.attribute; | ||
if (src) { | ||
var trailing_1 = src && src[0] === "/"; | ||
if (trailing_1) { | ||
try { | ||
void (function grabData() { | ||
return __awaiter(this, void 0, void 0, function () { | ||
var pathUrl, res, source; | ||
return __generator(this, function (_a) { | ||
switch (_a.label) { | ||
case 0: | ||
pathUrl = "" + url + (trailing_1 ? "" : "/") + src; | ||
return [4, isomorphic_unfetch_1["default"](pathUrl, { | ||
uri: pathUrl, | ||
headers: config_1.headers | ||
})]; | ||
case 1: | ||
res = _a.sent(); | ||
return [4, res.text()]; | ||
case 2: | ||
source = _a.sent(); | ||
$html(key + "[" + attribute + "=\"" + src + "\"]").html(source); | ||
return [2]; | ||
} | ||
}); | ||
if (src === void 0) { src = ""; } | ||
var hosted = src && src[0] === "/"; | ||
if (hosted) { | ||
try { | ||
void (function grabData() { | ||
return __awaiter(this, void 0, void 0, function () { | ||
var pathUrl, res, source; | ||
return __generator(this, function (_a) { | ||
switch (_a.label) { | ||
case 0: | ||
pathUrl = "" + url + (hosted ? "" : "/") + src; | ||
return [4, isomorphic_unfetch_1["default"](pathUrl, { | ||
uri: pathUrl, | ||
headers: config_1.headers | ||
})]; | ||
case 1: | ||
res = _a.sent(); | ||
return [4, res.text()]; | ||
case 2: | ||
source = _a.sent(); | ||
$html(key + "[" + attribute + "=\"" + src + "\"]").html(source); | ||
return [2]; | ||
} | ||
}); | ||
})(); | ||
} | ||
catch (e) { | ||
console.error(e); | ||
} | ||
}); | ||
})(); | ||
} | ||
return src; | ||
catch (e) { | ||
console.error(e); | ||
} | ||
} | ||
return null; | ||
return src || null; | ||
} | ||
@@ -102,0 +100,0 @@ function renderErrorHtml(_a) { |
{ | ||
"name": "node-iframe", | ||
"version": "1.4.7", | ||
"version": "1.4.8", | ||
"description": "create a iframe on your server to bypass CORS issues. ( reverse engineer security issues )", | ||
@@ -5,0 +5,0 @@ "main": "dist/iframe.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
40749
626