Unverified Commit a38b5d2f authored by Raul Melo's avatar Raul Melo Committed by GitHub

docs(middleware): add _next/image to match ignore (#44659)

I copied the middleware example from the docs to ignore a few matches but the optimized images stopped working. I figure that it was missing adding in the Regex of my middleware.

## Documentation / Examples

- [x] Make sure the linting passes by running `pnpm build && pnpm lint`
parent 54ef48f7
...@@ -97,9 +97,10 @@ export const config = { ...@@ -97,9 +97,10 @@ export const config = {
* Match all request paths except for the ones starting with: * Match all request paths except for the ones starting with:
* - api (API routes) * - api (API routes)
* - _next/static (static files) * - _next/static (static files)
* - _next/image (image optimization files)
* - favicon.ico (favicon file) * - favicon.ico (favicon file)
*/ */
'/((?!api|_next/static|favicon.ico).*)', '/((?!api|_next/static|_next/image|favicon.ico).*)',
], ],
} }
``` ```
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment