mirror of
https://github.com/klokantech/tileserver-php.git
synced 2025-08-05 14:18:13 +02:00
Use https with X-Forwarded-Proto (issue #92)
This commit is contained in:
@@ -1228,7 +1228,7 @@ class Router {
|
||||
$request_method = strtolower($_SERVER['REQUEST_METHOD']);
|
||||
$path_info = '/';
|
||||
global $config;
|
||||
$config['protocol'] = ( isset($_SERVER["HTTPS"]) or $_SERVER['SERVER_PORT'] == '443') ? "https" : "http";
|
||||
$config['protocol'] = ((isset($_SERVER['HTTPS']) or $_SERVER['SERVER_PORT'] == '443') or $_SERVER['X-Forwarded-Proto']) == 'https' ? 'https' : 'http';
|
||||
if (!empty($_SERVER['PATH_INFO'])) {
|
||||
$path_info = $_SERVER['PATH_INFO'];
|
||||
} else if (!empty($_SERVER['ORIG_PATH_INFO']) && strpos($_SERVER['ORIG_PATH_INFO'], 'tileserver.php') === false) {
|
||||
|
Reference in New Issue
Block a user