mirror of
https://github.com/humhub/humhub.git
synced 2025-01-16 21:58:17 +01:00
Fix Base URL detection on Prerequisites (#7279)
* Fix Base URL detection on Prerequisites * Autocommit PHP CS Fixer
This commit is contained in:
parent
02c663cc5a
commit
e10bd87a12
@ -532,4 +532,4 @@ return [
|
||||
'defer',
|
||||
],
|
||||
],
|
||||
];
|
||||
];
|
||||
|
@ -437,9 +437,13 @@ class SelfTest
|
||||
? ($_SERVER['HTTPS'] === 'on' || $_SERVER['HTTPS'] === 1 || $_SERVER['SERVER_PORT'] == $sslPort ? 'https' : 'http')
|
||||
: ($_SERVER['SERVER_PORT'] == $sslPort ? 'https' : 'http')
|
||||
);
|
||||
$currentBaseUrl = $scheme . '://' . $_SERVER['HTTP_HOST']
|
||||
. (($scheme === 'https' && $_SERVER['SERVER_PORT'] == $sslPort) ||
|
||||
($scheme === 'http' && $_SERVER['SERVER_PORT'] == $httpPort) ? '' : ':' . $_SERVER['SERVER_PORT'])
|
||||
$currentBaseUrl = $scheme . '://' . preg_replace('/:\d+$/', '', $_SERVER['HTTP_HOST'])
|
||||
. (
|
||||
($scheme === 'https' && $_SERVER['SERVER_PORT'] == $sslPort) ||
|
||||
($scheme === 'http' && $_SERVER['SERVER_PORT'] == $httpPort)
|
||||
? ''
|
||||
: ':' . $_SERVER['SERVER_PORT']
|
||||
)
|
||||
. ($_SERVER['BASE'] ?? '');
|
||||
if ($currentBaseUrl === Yii::$app->settings->get('baseUrl')) {
|
||||
$checks[] = [
|
||||
|
Loading…
x
Reference in New Issue
Block a user