1
0
mirror of https://github.com/klokantech/tileserver-php.git synced 2025-08-04 13:47:49 +02:00

Fixed bug in condition with X-Forwarded-Proto

This commit is contained in:
Dalibor Janák
2016-12-06 23:18:30 +01:00
parent 758b6a1e4d
commit 5f314fef28

View File

@@ -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') or $_SERVER['HTTP_X_FORWARDED_PROTO']) == 'https' ? 'https' : 'http';
$config['protocol'] = ((isset($_SERVER['HTTPS']) or $_SERVER['SERVER_PORT'] == '443') or $_SERVER['HTTP_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) {