fix: the trust proxy setting
This commit is contained in:
+6
-1
@@ -26,7 +26,12 @@ for (const item of portals) {
|
||||
// Create express instance
|
||||
const app = express();
|
||||
|
||||
app.set("trust proxy", 1);
|
||||
app.set("trust proxy", true);
|
||||
app.use((req, res, next) => {
|
||||
console.log(req.ip);
|
||||
console.log(req.ips);
|
||||
next();
|
||||
});
|
||||
app.disable("x-powered-by");
|
||||
|
||||
app.use(morgan("combined"));
|
||||
|
||||
Reference in New Issue
Block a user