Exclude all API routes from proxy matcher

Prevent middleware proxy from intercepting storage upload endpoints by excluding every /api path, restoring upload token handshake reliability.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Strtus 2026-05-19 00:38:07 +08:00
parent 711a44265c
commit 2c630ebd50

View File

@ -54,5 +54,5 @@ export const config = {
// - /template-image-tight // - /template-image-tight
// - /template-url // - /template-url
// eslint-disable-next-line max-len // eslint-disable-next-line max-len
matcher: ['/((?!api$|api/auth|_next/static|_next/image|favicon.ico$|favicons/|grid$|full$|about$|home-image$|template-image$|template-image-tight$|template-url$|$).*)'], matcher: ['/((?!api(?:/|$)|_next/static|_next/image|favicon.ico$|favicons/|grid$|full$|about$|home-image$|template-image$|template-image-tight$|template-url$|$).*)'],
}; };