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`.
171
171
#### Before
172
172
173
173
``` javascript
174
+ // pages/_middleware.ts
174
175
import { NextResponse } from ' next/server'
175
176
import type { NextRequest } from ' next/server'
176
177
@@ -246,7 +247,7 @@ The helper is imported from `next/server` and allows you to opt in to using the
246
247
#### Before
247
248
248
249
``` typescript
249
- // middleware .ts
250
+ // pages/_middleware .ts
250
251
import { NextRequest , NextResponse } from ' next/server'
251
252
252
253
export function middleware(request : NextRequest ) {
@@ -291,7 +292,7 @@ Use [`URLPattern`](https://developer.mozilla.org/en-US/docs/Web/API/URLPattern)
291
292
#### Before
292
293
293
294
``` typescript
294
- // middleware .ts
295
+ // pages/_middleware .ts
295
296
import { NextResponse } from ' next/server'
296
297
import type { NextRequest } from ' next/server'
297
298
You can’t perform that action at this time.
0 commit comments