typo
This commit is contained in:
@ -75,12 +75,13 @@ app
|
|||||||
server.use((req, res, next) => {
|
server.use((req, res, next) => {
|
||||||
req.headers['x-forwarded-host'] = req.headers['x-forwarded-host'] || req.headers.host;
|
req.headers['x-forwarded-host'] = req.headers['x-forwarded-host'] || req.headers.host;
|
||||||
// ---------------
|
// ---------------
|
||||||
if (!baseUrlGloball) {
|
if (!baseUrlGlobal) {
|
||||||
const protocol = req.headers['x-forwarded-proto'] || 'http';
|
const protocol = req.headers['x-forwarded-proto'] || 'http';
|
||||||
const host = req.headers.host;
|
const host = req.headers.host;
|
||||||
const baseUrl = `${protocol}://${host}`;
|
const baseUrl = `${protocol}://${host}`;
|
||||||
baseUrlGlobal = baseUrl;
|
baseUrlGlobal = baseUrl;
|
||||||
fs.writeFileSync(path.join(__dirname, 'baseUrl.txt'), baseUrlGlobal, 'utf8');
|
fs.writeFileSync(path.join(__dirname, 'baseUrl.txt'), baseUrlGlobal, 'utf8');
|
||||||
|
console.log("baseUrlGlobal set to: " + baseUrlGlobal);
|
||||||
}
|
}
|
||||||
next();
|
next();
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user