Skip to content
Snippets Groups Projects
Commit fe8688bb authored by Jaime Pérez Crespo's avatar Jaime Pérez Crespo
Browse files

Revert "Do not add default ports to self URL when guessing it."

This reverts commit 1218f38a.
parent 1218f38a
No related branches found
No related tags found
No related merge requests found
......@@ -780,14 +780,12 @@ class HTTP
* It doesn't matter which one of those cases we have. We just know we can't apply our base URL to the
* current URI, so we need to build it back from the PHP environment.
*/
$https = self::getServerHTTPS();
$protocol = 'http';
$protocol .= $https ? 's' : '';
$protocol .= (self::getServerHTTPS()) ? 's' : '';
$protocol .= '://';
$hostname = self::getServerHost();
$port = self::getServerPort();
$port = ($https && $port !== ':443') || (!$https && $port !== ':80') ? $port : '';
return $protocol.$hostname.$port.$_SERVER['REQUEST_URI'];
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment