We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3b628bb commit c3e893dCopy full SHA for c3e893d
demos/middleware/middleware.ts
@@ -21,7 +21,9 @@ export async function middleware(req: NextRequest) {
21
}
22
23
const request = new MiddlewareRequest(req)
24
- if (pathname.startsWith('/static')) {
+
25
+ // skipMiddlewareUrlNormalize next config option is used so we have to try to match both html path and data blob path
26
+ if (pathname.startsWith('/static') || pathname.endsWith('static.json')) {
27
// Unlike NextResponse.next(), this actually sends the request to the origin
28
const res = await request.next()
29
const message = `This was static (& escaping test &) but has been transformed in ${req.geo?.city}`
0 commit comments