Created
November 8, 2022 07:44
-
-
Save szymonkorytnicki/20594f318fe0b4f3e245d071054c6cae to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { NextResponse } from 'next/server'; | |
import type { NextRequest } from 'next/server'; | |
import { anotherMiddleware } from './middlewares/anotherMiddleware'; | |
import { someMiddleware } from './middlewares/someMiddleware'; | |
type middlewareFunction = (request: NextRequest, response: NextResponse) => NextResponse | Promise<NextResponse>; | |
const MIDDLEWARES: middlewareFunction[] = [someMiddleware, anotherMiddleware]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment