
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
snapcrawl-vercel-ssr
Advanced tools
Vercel integration for SnapCrawl. Serve pre-rendered HTML to crawlers in Next.js middleware or Edge Functions for static SPAs and Express apps.
HTML prerendering for Vercel projects powered by SnapCrawl.
This package provides simple helpers for:
vercel.json
routeSearch and social crawlers often struggle with client-side apps (React, Vue, Angular, etc.). SnapCrawl renders your pages server-side and returns fully-formed HTML to bots — improving SEO, social previews, and crawl reliability.
This package makes SnapCrawl plug-and-play on Vercel's Edge Runtime.
npm install snapcrawl-vercel-ssr
# or
yarn add snapcrawl-vercel-ssr
Set your secret in Vercel → Project Settings → Environment Variables:
SNAPCRAWL_SECRET
= your-secret-value
Create or edit middleware.{js,ts}
at the project root:
// middleware.js
import { withSnapCrawl } from "snapcrawl-vercel-ssr/next";
function otherMiddleware() {
// Optional: your existing logic
}
export default withSnapCrawl({ secret: process.env.SNAPCRAWL_SECRET })(
otherMiddleware
);
success:false
, the middleware falls back to your normal app.Add an Edge Function and a tiny route that sends crawler traffic to it.
vercel.json
{
"routes": [
{
"src": "/(.*)",
"has": [
{
"type": "header",
"key": "user-agent",
"value": "(?i)(applebot|baiduspider|bingbot|bitlybot|bitrix link preview|chatgpt-user/2\\.0|chrome-lighthouse|developers\\.google\\.com/\\+/web/snippet|discordbot|embedly|facebookexternalhit|flipboard|google page speed|google-cloudvertexbot|google-extended|googlebot|googleother|gptbot|ia_archiver|linkedinbot|mistralai-user/1\\.0|nuzzel|outbrain|perplexity-user/1\\.0|pinterest/0\\.|pinterestbot|quora link preview|qwantify|redditbot|rogerbot|seznambot|showyoubot|skypeuripreview|slackbot|swiftbot|telegrambot|tumblr|twitterbot|vkshare|w3c_validator|whatsapp|xing-contenttabreceiver|yahoo! slurp|yandex)"
}
],
"dest": "/api/snapcrawl"
}
]
}
api/snapcrawl.js
import { createEdgeHandler } from "snapcrawl-vercel-ssr";
export const config = { runtime: "edge" };
export default createEdgeHandler({ secret: process.env.SNAPCRAWL_SECRET });
How it works
/api/snapcrawl
where SnapCrawl returns prerendered HTML.User-Agent
(Next.js middleware also uses a tiny heuristic).js
, .css
, images, fonts, etc.withSnapCrawl({ secret })
Wraps (or acts as) your Next.js middleware default export.
secret
(string, required): your SnapCrawl API secret.NextResponse.next()
or your existing middleware.createEdgeHandler({ secret })
Edge Function handler for SPA/Express projects on Vercel.
secret
(string, required): your SnapCrawl API secret.204
to let Vercel serve your app.FAQs
Vercel integration for SnapCrawl. Serve pre-rendered HTML to crawlers in Next.js middleware or Edge Functions for static SPAs and Express apps.
We found that snapcrawl-vercel-ssr 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
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.