Skip to content

Install: Vercel edge ​

The Vercel edge wall runs as Vercel middleware, at the edge in front of your Next.js (or other) site.

When to use

Your site is on Vercel. The wall runs in the V8 isolate as a middleware.ts — no separate deployment.

1. Download the package ​

From the dashboard, choose Vercel and download mothershy-wall-vercel-0.1.0.tgz.

2. Install and wire the middleware ​

bash
npm install ./mothershy-wall-vercel-0.1.0.tgz

Create middleware.ts in your project root:

ts
import { mothershyEdge } from '@mothershy/wall-vercel'

const wall = mothershyEdge({
  siteId: process.env.MOTHERSHY_SITE_ID || 'example.com',
  rootPub: process.env.MOTHERSHY_ROOT_PUB || '',
})

export default async function middleware(request: Request) {
  const block = await wall(request)
  if (block) return block
  return NextResponse.next()
}

export const config = { matcher: '/((?!_next/static|_next/image|favicon.ico).*)' }

3. Set env vars ​

In Vercel → Project → Settings → Environment Variables:

  • MOTHERSHY_SITE_ID — your verified domain
  • MOTHERSHY_ROOT_PUB — the pinned Mother public root

4. Deploy and verify ​

bash
vercel --prod
# human → 200, agent → 402, Googlebot → 200

Notes ​

  • Static assets (/_next/static, images, favicon) are excluded via the matcher — they're never gated.
  • The Vercel wall is offline (verify-only). The online/ledger path is Cloudflare-only today.

Next ​

MotherShy — the economic operating layer for AI agents and publishers.