node-iframe
Advanced tools
+1
-1
| { | ||
| "name": "node-iframe", | ||
| "version": "1.4.0", | ||
| "version": "1.4.1", | ||
| "description": "create a iframe on your server to bypass CORS issues. ( reverse engineer security issues )", | ||
@@ -5,0 +5,0 @@ "main": "dist/iframe.js", |
+14
-10
@@ -23,4 +23,4 @@ # node-iframe | ||
| url: req.query.url, | ||
| baseHref: req.query.baseHref, // optional determine how to control link redirects, | ||
| config: JSON.parse(req.query.config), // parse config if sent as query, | ||
| baseHref: req.query.baseHref, // optional: determine how to control link redirects, | ||
| config: JSON.parse(req.query.config), // optional: determine element cors or inlining per route | ||
| }) | ||
@@ -36,7 +36,16 @@ ); | ||
| You can even fetch the iframe directly by importing fetchFrame on the client or server. | ||
| You can even fetch the iframe directly by importing `fetchFrame` on the client or server. | ||
| ```typescript | ||
| const { fetchFrame } = require("node-iframe"); | ||
| async function fetchIframe() { | ||
| return await fetchFrame({ url: "https://www.etsy.com" }); | ||
| } | ||
| ``` | ||
| Configure how to handle resources for all request can be controlled top level or scoped. | ||
| ```typescript | ||
| const { | ||
| fetchFrame, | ||
| configureResourceControl, | ||
@@ -47,3 +56,3 @@ configureCacheControl, | ||
| // optional: configure if element should be inlined, cors, etc | ||
| // optional: configure if element should be inlined, cors, etc, this combines with the `config` param | ||
| configureResourceControl({ | ||
@@ -56,10 +65,5 @@ inline: { script: true, link: false }, | ||
| configureCacheControl({ stdTTL: 0, checkperiod: 600, disabled: false }); | ||
| // optional: configure error-pages - check src/templates for more info | ||
| // 0: error, 1: not-found, 2: all templates - check src/templates/config for options | ||
| configureTemplates("<div>No Fish found</div>", 1); | ||
| async function fetchIframe() { | ||
| return await fetchFrame({ url: "https://www.etsy.com" }); | ||
| } | ||
| ``` | ||
@@ -66,0 +70,0 @@ |
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
41756
0.5%72
5.88%