mirror of https://github.com/MISP/MISP
Update to the baseurl check in the health tool
- https was checked incorrectly beforepull/304/merge
parent
50b1676fe8
commit
0e2d8e9a55
|
@ -916,7 +916,7 @@ class Server extends AppModel {
|
|||
}
|
||||
public function testBaseURL($value) {
|
||||
if ($this->testForEmpty($value) !== true) return $this->testForEmpty($value);
|
||||
$protocol = stripos($_SERVER['SERVER_PROTOCOL'],'https') === true ? 'HTTPS' : 'HTTP';
|
||||
$protocol = ((!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') || $_SERVER['SERVER_PORT'] == 443) === true ? 'HTTPS' : 'HTTP';
|
||||
if ($value != strtolower($protocol) . '://' . $_SERVER[$protocol . '_HOST']) return false;
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue