UNPKG

header-middleware-next

Version:

A lightweight and flexible middleware utility for managing HTTP headers in Next.js applications. Supports header extraction, transformation, masking, and safe injection for Edge and API routes.

5 lines (4 loc) 175 B
import { NextRequest, NextResponse } from "next/server"; export function headerMiddleware( req: NextRequest ): Promise<NextResponse | { status: "Completed" | string }>;