configureTrustProxy
configureTrustProxy(
app,env):TrustedHops
Reads TRUST_PROXY as trustedHopsFromEnv does and sets Express’s
trust proxy to the same hop count or address list, so req.ip in your
own code agrees with the IP the auth flows see (a clientIpHeader is the
module’s alone: Express does not read it). Returns the value, for
AuthModule’s trustedHops. Express only: on Fastify, pass
trustProxy: <the same value> to the FastifyAdapter instead.
Parameters
Section titled “Parameters”INestApplication
Returns
Section titled “Returns”TrustedHops