mirror of
https://github.com/DirectoryLister/DirectoryLister.git
synced 2025-09-02 02:12:37 +02:00
Merge pull request #136 from pierew/master
Adding Support for Servers behind a Reverse Proxy
This commit is contained in:
@@ -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']);
|
||||
|
Reference in New Issue
Block a user