diff -Nru zoneminder-1.32.2~20181206175009/debian/changelog zoneminder-1.32.2~20181207084558/debian/changelog --- zoneminder-1.32.2~20181206175009/debian/changelog 2018-12-06 22:50:09.000000000 +0000 +++ zoneminder-1.32.2~20181207084558/debian/changelog 2018-12-07 13:45:58.000000000 +0000 @@ -1,5 +1,5 @@ -zoneminder (1.32.2~20181206175009-trusty) trusty; urgency=medium +zoneminder (1.32.2~20181207084558-trusty) trusty; urgency=medium * - -- Isaac Connor Thu, 06 Dec 2018 17:50:09 -0500 + -- Isaac Connor Fri, 07 Dec 2018 08:45:58 -0500 diff -Nru zoneminder-1.32.2~20181206175009/web/includes/Server.php zoneminder-1.32.2~20181207084558/web/includes/Server.php --- zoneminder-1.32.2~20181206175009/web/includes/Server.php 2018-12-06 22:52:52.000000000 +0000 +++ zoneminder-1.32.2~20181207084558/web/includes/Server.php 2018-12-07 13:47:59.000000000 +0000 @@ -51,13 +51,8 @@ } else if ( $this->Id() ) { return $this->{'Name'}; } - # Use HTTP_HOST instead of SERVER_NAME here for nginx compatiblity - # ICON: Hi, I just met you, and this is crazy, but I need to strip port. - $host_with_port_maybe = $_SERVER['HTTP_HOST']; - $heres_my_host = preg_replace('/([^:]+)(:\d+)?/','${1}', $host_with_port_maybe); - #Just use it baby - - return $heres_my_host; + $result = explode(':',$_SERVER['HTTP_HOST']); + return $result[0]; } public function Protocol( $new = null ) { @@ -96,12 +91,7 @@ public function Url( $port = null ) { $url = $this->Protocol().'://'; - if ( $this->Id() ) { - $url .= $this->Hostname(); - } else { - # Use HTTP_HOST instead of SERVER_NAME here for nginx compatiblity - $url .= $_SERVER['HTTP_HOST']; - } + $url .= $this->Hostname(); if ( $port ) { $url .= ':'.$port; } else {