Why?
Using app.use('trust proxy', true)
is likely too permissive, this post
explains concretely why.
Example Applications
Consider two Express applications index-first.js
that uses
app.set("trust proxy", true)
const express = require("express");
const app = express();
const port = 3000;
app.set("trust proxy", true);
app.get("/", (req, res …