Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
node-iframe
Advanced tools
Readme
create iframes to bypass security issues on your server with node.js can also be used in a browser
npm install node-iframe
as express middleware
import createIframe from "node-iframe";
app.use(createIframe);
app.get("/iframe", (req, res) => {
res.createIframe({
url: req.query.url,
baseHref: req.query.baseHref, // optional: determine how to control link redirects,
config: { cors: { script: true } }, // optional: determine element cors or inlining #shape src/iframe.ts#L34
});
});
On the client use directly in your iframe if your api is on the same server set the url below like this or if your using a framework like gatsby, nextjs, etc or non-express apps
<iframe src="/iframe/?url=https://www.etsy.com" />
You can even fetch the iframe directly by importing fetchFrame
on the client or server.
Set safeMode=true
in conjunction with inline scripts to add error handling.
import { fetchFrame } from "node-iframe";
async function fetchIframe() {
return await fetchFrame({ url: "https://www.etsy.com", safeMode: false });
}
Configure how to handle resources for all request
const { configureResourceControl, configureTemplates } = require("node-iframe");
// optional: configure if elements should be inlined, cors, etc, this combines with the `config` param
configureResourceControl({
inline: { script: true, link: false },
cors: { script: true },
});
// 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);
MIT
FAQs
create iframes on your server to bypass CORS. Reverse engineer security issues.
The npm package node-iframe receives a total of 225 weekly downloads. As such, node-iframe popularity was classified as not popular.
We found that node-iframe demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.