fix(proxy): changes to allow multiple onsite instances

This commit is contained in:
2025-10-28 07:40:55 -05:00
parent 6392441f1b
commit cc3657f66f

View File

@@ -86,7 +86,7 @@ const main = async () => {
app.use(
basePath + "/old",
createProxyMiddleware({
target: `http://localhost:3000`,
target: `http://localhost:${process.env.V1PORT || "3000"}`, // change this to pull from the correct port
changeOrigin: true,
pathRewrite: (path, req) => {
// Remove the basePath + '/old' prefix from the path dynamically
@@ -113,7 +113,9 @@ const main = async () => {
"http://localhost:4173",
"http://localhost:4200",
"http://localhost:3000",
"http://localhost:3001",
"http://localhost:4000",
"http://localhost:4001",
env.BETTER_AUTH_URL, // prod
];