Fix API proxy path - maintain /api/ prefix for backend calls

This commit is contained in:
TheMaddax 2025-11-14 10:40:46 -06:00
parent a2595246cc
commit ba654296e9

View file

@ -36,6 +36,7 @@ export async function DELETE(
async function proxyToBackend(request: NextRequest, pathSegments: string[]) {
const path = pathSegments.join('/');
// Use dedicated backend subdomain for reliable API access
// The catch-all route strips '/api/' from the path, so we need to add it back
const backendUrl = `https://files.mad-lawsuit.org/api/${path}`;
// Get the search params from the original request