some origin header
This commit is contained in:
12
src/middleware.ts
Normal file
12
src/middleware.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
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*',
|
||||
};
|
||||
Reference in New Issue
Block a user