12 lines
312 B
TypeScript
12 lines
312 B
TypeScript
import { NextResponse } from 'next/server';
|
|
import type { NextRequest } from 'next/server';
|
|
|
|
export function middleware(req: NextRequest) {
|
|
const res = NextResponse.next();
|
|
res.headers.set('X-Nonszy-Origin', process.env.ORIGIN ?? 'anywhere');
|
|
return res;
|
|
}
|
|
|
|
export const config = {
|
|
matcher: '/:path*',
|
|
}; |