mirror of https://github.com/MISP/MISP
chg: Changed the default bootstrap to not append port 80 / port 443 in any case
- it was causing issues for a user using a rather exotic configurationpull/1185/head
parent
044755fe07
commit
3df0ec60af
|
@ -95,17 +95,14 @@ if (!$relativePaths) {
|
|||
|
||||
if (!Configure::read('MISP.baseurl') && isset($serverName)) {
|
||||
if (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || (isset($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] == 443)) {
|
||||
if (!isset($_SERVER['SERVER_PORT']) || $_SERVER['SERVER_PORT'] == 443 || !$appendPort) {
|
||||
Configure::write('MISP.baseurl', sprintf('https://%s', $serverName));
|
||||
} else {
|
||||
Configure::write('MISP.baseurl', sprintf('https://%s:%d', $serverName, $_SERVER['SERVER_PORT']));
|
||||
}
|
||||
$protocol = 'https';
|
||||
} else {
|
||||
if (!isset($_SERVER['SERVER_PORT']) || $_SERVER['SERVER_PORT'] == 80 || !$appendPort) {
|
||||
Configure::write('MISP.baseurl', sprintf('http://%s', $serverName));
|
||||
} else {
|
||||
Configure::write('MISP.baseurl', sprintf('http://%s:%d', $serverName, $_SERVER['SERVER_PORT']));
|
||||
}
|
||||
$protocol = 'http';
|
||||
}
|
||||
if (!isset($_SERVER['SERVER_PORT']) || !in_array($_SERVER['SERVER_PORT'], array(443, 80)) || !$appendPort) {
|
||||
Configure::write('MISP.baseurl', sprintf('https://%s', $serverName));
|
||||
} else {
|
||||
Configure::write('MISP.baseurl', sprintf('https://%s:%d', $serverName, $_SERVER['SERVER_PORT']));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue