Socket
Socket
Sign inDemoInstall

node-iframe

Package Overview
Dependencies
26
Maintainers
1
Versions
74
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.4.0 to 1.4.1

2

package.json
{
"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",

@@ -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 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc