From 4eed994fcb6892aa28a393cbdedd85a4ca86a680 Mon Sep 17 00:00:00 2001 From: MarkLo Date: Sat, 13 Dec 2025 06:22:59 +0800 Subject: [PATCH] --- frontend/app/api/auth/google/token/route.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/app/api/auth/google/token/route.ts b/frontend/app/api/auth/google/token/route.ts index 2b54b697..cf8b66c1 100644 --- a/frontend/app/api/auth/google/token/route.ts +++ b/frontend/app/api/auth/google/token/route.ts @@ -4,7 +4,10 @@ */ import { NextRequest, NextResponse } from "next/server"; -const BACKEND_URL = process.env.BACKEND_URL || "http://localhost:8000"; +// Use backend internal URL if available (Railway), fallback to public URL +const BACKEND_URL = process.env.BACKEND_URL || + process.env.NEXT_PUBLIC_API_URL || + "http://localhost:8000"; export async function POST(request: NextRequest) { try {