Skip to content

Commit f6542d6

Browse files
authored
_server HTTPS more reliable than REQUEST_SCHEME
1 parent 4bffdd9 commit f6542d6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

include/functions_map.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ function osm_get_js($conf, $local_conf, $js_data)
308308
: 0;
309309

310310
// When gallery is SSL and when switching baselayerURL to https is possible
311-
$httpx = $_SERVER['REQUEST_SCHEME'];
311+
$httpx = (!empty($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) !== 'off')?'https':'http';
312312

313313
// Load baselayerURL
314314
if ($baselayer == 'mapnik') $baselayerurl = $httpx.'://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png';

0 commit comments

Comments
 (0)