magpie
Loading...
Searching...
No Matches
magpie::AppConfig Struct Reference

Public Attributes

uint16_t port = 8080
unsigned int concurrency = std::thread::hardware_concurrency()
std::string bindAddr = "127.0.0.1"
bool trustXRealIp = false

Member Data Documentation

◆ trustXRealIp

bool magpie::AppConfig::trustXRealIp = false

Whether or not to trust the X-Real-IP header. If true, the X-Real-IP header can override the ipAddr field in the Request object if set. If you set this to true, you MUST ensure that the X-Real-IP can only come from a trusted source, or you're exposing the server to multiple security vulnerabilities. This means that the server MUST be behind a reverse proxy, and not accessible to the general public in any other way.

See also
https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/X-Forwarded-For#security_and_privacy_concerns

The documentation for this struct was generated from the following file: