Skip to content

clientAddress

clientAddress(req, trustProxy?): string

The client’s address for the per-address limits. Behind a proxy (Caddy, nginx) every socket comes from the proxy, so all players would share one address and the limits (20 sockets, 30 joins a minute) would cap the whole server: with trustProxy, a request from a private or loopback peer is taken at the last X-Forwarded-For entry (the address the proxy saw). From any other peer the header is ignored, so a player cannot pick their own address.

Record<string, string | string[] | undefined>

{ remoteAddress?: string; }

string

boolean = false

string