
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
playwright-deblock
Advanced tools
Automatic fix for Playwright file:// navigation blocks. One require(), works forever.
Automatic fix for Playwright file:// navigation blocks.
One require(), works forever.
Restricted Playwright runners block file:// URLs:
Access to 'file:' URL is blocked. Allowed protocols: http, https, about, data.
npm install playwright-deblock
require("playwright-deblock");
Done. Every page.goto("file://...") is now automatically served over http://localhost.
// Add this ONE line at the top of your script or test
require("playwright-deblock");
// Then use file:// like normal — it just works
const browser = await chromium.launch();
const page = await browser.newPage();
await page.goto("file:///home/user/page.html"); // auto-redirected to http://
// playwright.config.js
module.exports = {
globalSetup: require.resolve("playwright-deblock/register"),
};
Or via CLI:
npx playwright test --require playwright-deblock/register
const deblock = require("playwright-deblock");
deblock.apply({ strategy: "data", silent: true });
const { serveAndGoto, cleanup } = require("playwright-deblock/helper");
test("loads local HTML", async ({ page }) => {
await serveAndGoto(page, "/path/to/file.html");
await expect(page.locator("h1")).toBeVisible();
});
test.afterAll(() => cleanup());
| Strategy | Protocol | Method |
|---|---|---|
http (primary) | http:// | Starts localhost server, serves the file's directory |
data (fallback) | data: | Inlines CSS/JS/images into a data: URL |
chromium, firefox, webkitplaywright and playwright-core| Export | Description |
|---|---|
apply(opts?) | Re-apply patch with options |
cleanup() | Stop all HTTP servers |
convertUrl(url) | Convert a file:// URL manually |
serveAndGoto(page, path) | Navigate without monkey-patching |
buildDataUrl(path) | Build a data: URL from HTML file |
inlineAssets(path) | Inline assets into HTML string |
MIT
FAQs
Automatic fix for Playwright file:// navigation blocks. One require(), works forever.
We found that playwright-deblock 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.