mirror of
https://github.com/khoaliber/LetterFeed.git
synced 2026-03-02 21:19:13 +00:00
feat: configurable backend url
This commit is contained in:
@@ -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*`,
|
||||
},
|
||||
];
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user