/** * Trusts $_SERVER entries coming from proxies. * * You should only call this method if your application * is hosted behind a reverse proxy that you manage. * * @api */ public static function trustProxyData() { self::$trustProxy = true; }
/** * Sets a list of trusted proxies. * * You should only list the reverse proxies that you manage directly. * * @param array $proxies A list of trusted proxies * * @api */ public static function setTrustedProxies(array $proxies) { self::$trustedProxies = $proxies; self::$trustProxy = $proxies ? true : false; }