Fix base scheme

This commit is contained in:
Dennis Eichhorn 2019-03-09 16:26:18 +01:00
parent 156c5849c7
commit 80f58b9d24

View File

@ -187,7 +187,10 @@ final class Http implements UriInterface
public static function getCurrent() : string
{
/** @noinspection PhpUndefinedConstantInspection */
return (\stripos($_SERVER['SERVER_PROTOCOL'], 'https') !== false ? 'https' : 'http' ) . '://' . ($_SERVER['HTTP_HOST'] ?? '') . ($_SERVER['REQUEST_URI'] ?? '');
return ((!empty($_SERVER['HTTPS'] ?? '') && ($_SERVER['HTTPS'] ?? '') !== 'off')
|| (($_SERVER['HTTP_X_FORWARDED_PROTO'] ?? '') === 'https')
|| (($_SERVER['HTTP_X_FORWARDED_SSL'] ?? '') === 'on'))
. '://' . ($_SERVER['HTTP_HOST'] ?? ''). ($_SERVER['REQUEST_URI'] ?? '');
}
/**