Skip to content

Commit d8b6cfa

Browse files
committed
chore(proxy): drop verbose CORS comments
1 parent 4e61bb0 commit d8b6cfa

1 file changed

Lines changed: 0 additions & 5 deletions

File tree

apps/sim/proxy.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -215,16 +215,11 @@ function handleSecurityFiltering(request: NextRequest): NextResponse | null {
215215
export 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
}

0 commit comments

Comments
 (0)