mirror of https://github.com/MISP/MISP
fix: revert to relative paths only for requests coming via the command line
- baseurl not auto-resolved if the $_SERVER['SERVER_ADDR'] isn't populated - solves issues with background workers executing requests on an instance where no baseurl is setpull/1147/head
parent
2b1d352073
commit
83a912fa47
|
@ -87,7 +87,7 @@ Configure::load('config');
|
|||
|
||||
$appendPort = true;
|
||||
|
||||
if (!Configure::read('MISP.baseurl')) {
|
||||
if (!Configure::read('MISP.baseurl') && isset($_SERVER['SERVER_ADDR'])) {
|
||||
if (isset($_SERVER['SERVER_NAME'])) $serverName = $_SERVER['SERVER_NAME'];
|
||||
else if (isset($_SERVER['HTTP_HOST'])) $serverName = $_SERVER['HTTP_HOST'];
|
||||
else $serverName = $_SERVER['SERVER_ADDR'];
|
||||
|
|
Loading…
Reference in New Issue