phpipam behind a load balancer which handles ssl offloading
phpipam has support for ssl offloading, via X-Forwarded-For header . public function createURL () { # reset url for base if($_SERVER['SERVER_PORT'] == "443") { $url = "https://$_SERVER[HTTP_HOST]"; } // reverse proxy doing SSL offloading elseif(isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https') { $url = "https://$_SERVER[SERVER_NAME]"; } elseif(isset($_SERVER['HTTP_X_SECURE_REQUEST']) && $_SERVER['HTTP_X_SECURE_REQUEST'] == 'true') { $url = "https://$_SERVER[SERVER_NAME]"; } // custom port elseif($_SERVER['SERVER_PORT']!="80") { $url = "http://$_SERVER[SERVER_NAME]:$_SERVER[SERVER_PORT]"; } // normal http Unfortunately, some don't foll
Comments
Post a Comment