feat: configurable backend url

This commit is contained in:
Leon
2025-07-22 19:04:32 +02:00
parent 1d99db6c19
commit baf393fe96
4 changed files with 15 additions and 9 deletions

View File

@@ -2,10 +2,11 @@ import type { NextConfig } from "next";
const nextConfig: NextConfig = {
async rewrites() {
const backendUrl = process.env.LETTERFEED_BACKEND_URL || "http://backend:8000";
return [
{
source: '/api/:path*',
destination: 'http://backend:8000/:path*',
source: "/api/:path*",
destination: `${backendUrl}/:path*`,
},
];
},