MCPcopy Create free account
hub / github.com/vercel/examples / middleware

Function middleware

solutions/html/middleware.js:3–14  ·  view source on GitHub ↗
(req)

Source from the content-addressed store, hash-verified

1import { next } from '@vercel/edge';
2
3export default function middleware(req) {
4 return next({
5 headers: {
6 'Referrer-Policy': 'origin-when-cross-origin',
7 'X-Frame-Options': 'DENY',
8 'X-Content-Type-Options': 'nosniff',
9 'X-DNS-Prefetch-Control': 'on',
10 'Strict-Transport-Security':
11 'max-age=31536000; includeSubDomains; preload',
12 },
13 });
14}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected