Skip to content

Commit d1d3552

Browse files
allow proxy route through auth middleware
The /api/gateway/proxy route authenticates via gateway_token in the Authorization header, not via Supabase session cookies. Add it to the public routes list so the middleware doesn't redirect to /login. Made-with: Cursor
1 parent 827cfa9 commit d1d3552

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/lib/supabase/middleware.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ export async function updateSession(request: NextRequest) {
3535

3636
const isPublicRoute = request.nextUrl.pathname === '/' ||
3737
isAuthRoute ||
38-
request.nextUrl.pathname.startsWith('/api/webhooks')
38+
request.nextUrl.pathname.startsWith('/api/webhooks') ||
39+
request.nextUrl.pathname.startsWith('/api/gateway/proxy')
3940

4041
if (!user && !isPublicRoute) {
4142
const url = request.nextUrl.clone()

0 commit comments

Comments
 (0)