/** * Check if server request is secure (https) or not. * * @return bool */ public function isSecure() { $https = $this->server->get('HTTPS'); return false === empty($https) && 'off' !== strtolower($https); }
/** * Get request uri. * * @return string */ public function getRequestUri() { return $this->server->get('REQUEST_URI', ''); }
private function isFromTrustedProxy() { return self::$trustedProxies && IpUtils::checkIp($this->server->get('REMOTE_ADDR'), self::$trustedProxies); }