Cockatrice 2026-10-19-Development-3.1.2-beta.2
A virtual tabletop for multiplayer card games
Loading...
Searching...
No Matches
forwarded_address.cpp File Reference
#include "forwarded_address.h"
#include <QString>
Include dependency graph for forwarded_address.cpp:

Functions

QHostAddress parseForwardedAddress (const QByteArray &headerValue)
 Parses the real client address out of a forwarded header value (X-Real-IP, X-Forwarded-For).

Function Documentation

◆ parseForwardedAddress()

QHostAddress parseForwardedAddress ( const QByteArray & headerValue)

Parses the real client address out of a forwarded header value (X-Real-IP, X-Forwarded-For).

A comma-separated list resolves to its rightmost usable entry. That entry was appended by the proxy closest to the server and is the only one a direct client cannot choose, since the earlier entries are passed through verbatim from whatever the client sent.

Returns
the parsed address, or a null QHostAddress when the value holds none.
Here is the call graph for this function:
Here is the caller graph for this function: