File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -215,16 +215,11 @@ function handleSecurityFiltering(request: NextRequest): NextResponse | null {
215215export async function proxy ( request : NextRequest ) {
216216 const url = request . nextUrl
217217
218- // /api/* short-circuits before handleSecurityFiltering — UA filtering was
219- // never applied to API routes under the prior matcher, and webhook/MCP
220- // exemptions in handleSecurityFiltering exist for non-API paths under /.
221218 if ( url . pathname . startsWith ( '/api/' ) ) {
222219 const policy = resolveApiCorsPolicy ( request )
223220 if ( request . method === 'OPTIONS' ) {
224221 return buildPreflightResponse ( policy )
225222 }
226- // Form routes reflect origin via addCorsHeaders in the route handler;
227- // skip middleware CORS here so the same header isn't written twice.
228223 if ( url . pathname === '/api/form' || url . pathname . startsWith ( '/api/form/' ) ) {
229224 return NextResponse . next ( )
230225 }
You can’t perform that action at this time.
0 commit comments