$this->originHost = $originUrl['host'];
$this->originPort = isset($originUrl['port']) ? $originUrl['port'] : ($this->originUseSSL ? 443 : 80);
- if (PROXY_SERVER_HTTP) {
- $parsedUrl = parse_url(PROXY_SERVER_HTTP);
- }
-
if (PROXY_SERVER_HTTP && !$this->originUseSSL) {
$this->path = $url;
}
$this->path = isset($parsedUrl['path']) ? $parsedUrl['path'] : '/';
}
+ if (PROXY_SERVER_HTTP) {
+ $parsedUrl = parse_url(PROXY_SERVER_HTTP);
+ }
+
$this->useSSL = $parsedUrl['scheme'] === 'https';
$this->host = $parsedUrl['host'];
$this->port = isset($parsedUrl['port']) ? $parsedUrl['port'] : ($this->useSSL ? 443 : 80);