mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-02-11 06:28:40 +00:00
Merge branch 'develop' of https://github.com/Orange-Management/phpOMS into develop
This commit is contained in:
commit
632ce1c4dc
|
|
@ -55,7 +55,7 @@ final class Dispatcher
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function __construct(ApplicationAbstract $app)
|
public function __construct(ApplicationAbstract $app = null)
|
||||||
{
|
{
|
||||||
$this->app = $app;
|
$this->app = $app;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -187,7 +187,10 @@ final class Http implements UriInterface
|
||||||
public static function getCurrent() : string
|
public static function getCurrent() : string
|
||||||
{
|
{
|
||||||
/** @noinspection PhpUndefinedConstantInspection */
|
/** @noinspection PhpUndefinedConstantInspection */
|
||||||
return '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') ? 'https' : 'http')
|
||||||
|
. '://' . ($_SERVER['HTTP_HOST'] ?? ''). ($_SERVER['REQUEST_URI'] ?? '');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -116,6 +116,7 @@ final class UriFactory
|
||||||
{
|
{
|
||||||
self::setQuery('/scheme', $uri->getScheme());
|
self::setQuery('/scheme', $uri->getScheme());
|
||||||
self::setQuery('/host', $uri->getHost());
|
self::setQuery('/host', $uri->getHost());
|
||||||
|
self::setQuery('/port', (string) $uri->getPort());
|
||||||
self::setQuery('/base', \rtrim($uri->getBase(), '/'));
|
self::setQuery('/base', \rtrim($uri->getBase(), '/'));
|
||||||
self::setQuery('/rootPath', $uri->getRootPath());
|
self::setQuery('/rootPath', $uri->getRootPath());
|
||||||
self::setQuery('?', $uri->getQuery());
|
self::setQuery('?', $uri->getQuery());
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user