File tree Expand file tree Collapse file tree 5 files changed +49
-0
lines changed
middleware-trailing-slash/app
skip-trailing-slash-redirect/app
integration/next-image-new/middleware Expand file tree Collapse file tree 5 files changed +49
-0
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,14 @@ import { getSomeData } from './lib/some-data'
4
4
import magicValue from 'shared-package'
5
5
6
6
export const config = {
7
+ // Matcher needed to test internal routes /_next/ (skipped by default)
8
+ matcher : [
9
+ '/:path*' ,
10
+ {
11
+ source : '/_next/:path*' ,
12
+ locale : false ,
13
+ } ,
14
+ ] ,
7
15
regions : 'auto' ,
8
16
runtime : 'nodejs' ,
9
17
}
Original file line number Diff line number Diff line change @@ -4,6 +4,14 @@ import { getSomeData } from './lib/some-data'
4
4
import magicValue from 'shared-package'
5
5
6
6
export const config = {
7
+ // Matcher needed to test internal routes /_next/ (skipped by default)
8
+ matcher : [
9
+ '/:path*' ,
10
+ {
11
+ source : '/_next/:path*' ,
12
+ locale : false ,
13
+ } ,
14
+ ] ,
7
15
regions : 'auto' ,
8
16
}
9
17
Original file line number Diff line number Diff line change @@ -104,3 +104,14 @@ const params = (url) => {
104
104
}
105
105
return result
106
106
}
107
+
108
+ // Matcher needed to test internal routes /_next/ (skipped by default)
109
+ export const config = {
110
+ matcher : [
111
+ '/:path*' ,
112
+ {
113
+ source : '/_next/:path*' ,
114
+ locale : false ,
115
+ } ,
116
+ ] ,
117
+ }
Original file line number Diff line number Diff line change @@ -87,3 +87,14 @@ export default function handler(req) {
87
87
88
88
return NextResponse . next ( )
89
89
}
90
+
91
+ // Matcher needed to test internal routes /_next/ (skipped by default)
92
+ export const config = {
93
+ matcher : [
94
+ '/:path*' ,
95
+ {
96
+ source : '/_next/:path*' ,
97
+ locale : false ,
98
+ } ,
99
+ ] ,
100
+ }
Original file line number Diff line number Diff line change @@ -8,3 +8,14 @@ export async function middleware(request) {
8
8
console . log ( `x-_next-image: ${ request . nextUrl . searchParams . get ( 'url' ) } ` )
9
9
}
10
10
}
11
+
12
+ // Matcher needed to test internal routes /_next/ (skipped by default)
13
+ export const config = {
14
+ matcher : [
15
+ '/:path*' ,
16
+ {
17
+ source : '/_next/:path*' ,
18
+ locale : false ,
19
+ } ,
20
+ ] ,
21
+ }
You can’t perform that action at this time.
0 commit comments