fix(all): Removed router.
This commit is contained in:
parent
294ab87077
commit
1de47e4b0a
2 changed files with 7 additions and 5 deletions
|
|
@ -700,14 +700,14 @@ await fs.writeFile('.env', env);
|
||||||
let isEdit = false;
|
let isEdit = false;
|
||||||
|
|
||||||
// Loop through column A to find the row where name matches, or find the next empty row
|
// Loop through column A to find the row where name matches, or find the next empty row
|
||||||
for (let i = 1; i <= rows.length; i++) {
|
for (let i = 7; i <= rows.length; i++) {
|
||||||
let result = rows[i - 1][0];
|
let result = rows[i - 1][0];
|
||||||
if (result && result.toLowerCase() === name.toLowerCase()) {
|
if (result && result.toLowerCase() === name.toLowerCase()) {
|
||||||
address = `B${i}:B${i}`; // Match found, update value in column B
|
address = `B${i}:B${i}`; // Match found, update value in column B
|
||||||
isEdit = true; // We are in editing mode
|
isEdit = true; // We are in editing mode
|
||||||
break;
|
break;
|
||||||
} else if (!result && lastEmptyRow === -1) {
|
} else if (!result && lastEmptyRow === -1) {
|
||||||
lastEmptyRow = i; // Store the first empty row if no match is found
|
lastEmptyRow = i ; // Store the first empty row if no match is found
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -283,15 +283,17 @@ export class GBServer {
|
||||||
} else {
|
} else {
|
||||||
// Setups unsecure http redirect.
|
// Setups unsecure http redirect.
|
||||||
const proxy = httpProxy.createProxyServer({});
|
const proxy = httpProxy.createProxyServer({});
|
||||||
GBLogEx.verbose(0, `Redirecting... ${req.originalUrl}`);
|
|
||||||
|
|
||||||
if (host === process.env.API_HOST) {
|
if (host === process.env.API_HOST) {
|
||||||
|
GBLogEx.info(0, `Redirecting to API...`);
|
||||||
return proxy.web(req, res, { target: 'http://localhost:1111' }); // Express server
|
return proxy.web(req, res, { target: 'http://localhost:1111' }); // Express server
|
||||||
} else if (host === process.env.ROUTER_1) {
|
} else if (host === process.env.ROUTER_1) {
|
||||||
return proxy.web(req, res, { target: `http://localhost:${process.env.ROUTER_1_PORT}` });
|
GBLogEx.info(0, `Redirecting...`);
|
||||||
|
return proxy.web(req, res, { target: `http://localhost:${process.env.ROUTER_1_PORT}` }); // Express server
|
||||||
|
|
||||||
} else if (host === process.env.ROUTER_2) {
|
} else if (host === process.env.ROUTER_2) {
|
||||||
return proxy.web(req, res, { target: `http://localhost:${process.env.ROUTER_2_PORT}` });
|
GBLogEx.info(0, `Redirecting...`);
|
||||||
|
return proxy.web(req, res, { target: `http://localhost:${process.env.ROUTER_2_PORT}` }); // Express server
|
||||||
} else {
|
} else {
|
||||||
await GBSSR.ssrFilter(req, res, next);
|
await GBSSR.ssrFilter(req, res, next);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue