Class ReverseProxyOptions

Assembly: redb.Identity.Core.dll

C2 — Configuration for the trusted-reverse-proxy whitelist consulted by
.

public sealed class ReverseProxyOptions

Inheritance

Object→ReverseProxyOptions

Properties

KnownNetworks

CIDR networks of trusted reverse proxies.

public List<IPNetwork> KnownNetworks { get; set; }

KnownProxies

Individual IP addresses of trusted reverse proxies.

public List<IPAddress> KnownProxies { get; set; }

TrustForwardedFor

When true, the resolver consults the X-Forwarded-For header on requests

public bool TrustForwardedFor { get; set; }

Remarks

Secure-by-default: with = false (the default),
the resolver ignores all X-Forwarded-For / Forwarded headers and the
socket IP carried by redbHttp.RemoteAddress is propagated unchanged. This means
per-IP throttling (C1) sees only the immediate TCP peer — correct when the service is
exposed directly. Enable forwarded-IP resolution only when the service sits behind a
trusted reverse proxy whose IPs are listed here; otherwise an attacker can spoof
X-Forwarded-For and bypass per-IP rate limits.