File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -171,6 +171,7 @@ As well as other extended methods from `Map`.
171171#### Before
172172
173173``` javascript
174+ // pages/_middleware.ts
174175import { NextResponse } from ' next/server'
175176import type { NextRequest } from ' next/server'
176177
@@ -246,7 +247,7 @@ The helper is imported from `next/server` and allows you to opt in to using the
246247#### Before
247248
248249``` typescript
249- // middleware .ts
250+ // pages/_middleware .ts
250251import { NextRequest , NextResponse } from ' next/server'
251252
252253export function middleware(request : NextRequest ) {
@@ -291,7 +292,7 @@ Use [`URLPattern`](https://developer.mozilla.org/en-US/docs/Web/API/URLPattern)
291292#### Before
292293
293294``` typescript
294- // middleware .ts
295+ // pages/_middleware .ts
295296import { NextResponse } from ' next/server'
296297import type { NextRequest } from ' next/server'
297298
You can’t perform that action at this time.
0 commit comments