Merge pull request #136 from pierew/master

Adding Support for Servers behind a Reverse Proxy
This commit is contained in:
Chris Kankiewicz
2017-06-10 17:51:56 -07:00
committed by GitHub

View File

@@ -798,7 +798,11 @@ class DirectoryLister {
}
// Get the server hostname
$host = $_SERVER['HTTP_HOST'];
if (isset($_SERVER['HTTP_X_FORWARDED_HOST'])) {
$host = $_SERVER['HTTP_X_FORWARDED_HOST'];
} else {
$host = $_SERVER['HTTP_HOST'];
}
// Get the URL path
$pathParts = pathinfo($_SERVER['PHP_SELF']);