fix(proxy): changes to allow multiple onsite instances
This commit is contained in:
@@ -86,7 +86,7 @@ const main = async () => {
|
|||||||
app.use(
|
app.use(
|
||||||
basePath + "/old",
|
basePath + "/old",
|
||||||
createProxyMiddleware({
|
createProxyMiddleware({
|
||||||
target: `http://localhost:3000`,
|
target: `http://localhost:${process.env.V1PORT || "3000"}`, // change this to pull from the correct port
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
pathRewrite: (path, req) => {
|
pathRewrite: (path, req) => {
|
||||||
// Remove the basePath + '/old' prefix from the path dynamically
|
// Remove the basePath + '/old' prefix from the path dynamically
|
||||||
@@ -113,7 +113,9 @@ const main = async () => {
|
|||||||
"http://localhost:4173",
|
"http://localhost:4173",
|
||||||
"http://localhost:4200",
|
"http://localhost:4200",
|
||||||
"http://localhost:3000",
|
"http://localhost:3000",
|
||||||
|
"http://localhost:3001",
|
||||||
"http://localhost:4000",
|
"http://localhost:4000",
|
||||||
|
"http://localhost:4001",
|
||||||
env.BETTER_AUTH_URL, // prod
|
env.BETTER_AUTH_URL, // prod
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user