This commit is contained in:
MarkLo 2025-12-13 06:22:59 +08:00
parent bcfa6dab06
commit 4eed994fcb
1 changed files with 4 additions and 1 deletions

View File

@ -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 {