Added websocket url to config file
This commit is contained in:
parent
08878eab81
commit
d8e75e5b49
|
|
@ -23,6 +23,10 @@ leaflet_raster_tile_satellite="" ;; Examples: "HERE.satelliteDay"
|
||||||
coverage_only_moving_senders="0"
|
coverage_only_moving_senders="0"
|
||||||
coverage_percentile="95"
|
coverage_percentile="95"
|
||||||
|
|
||||||
|
;; Url to the websocket server, if you use https you need to set this
|
||||||
|
;; If nothing is set we will try the url: ws://current-url:9000/ws
|
||||||
|
;websocket_url="wss://ws.my-domain.com"
|
||||||
|
|
||||||
|
|
||||||
[database]
|
[database]
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -147,8 +147,8 @@ $REQUEST_PROTOCOL = $isSecure ? 'https' : 'http';
|
||||||
|
|
||||||
var supportsWebSockets = 'WebSocket' in window || 'MozWebSocket' in window;
|
var supportsWebSockets = 'WebSocket' in window || 'MozWebSocket' in window;
|
||||||
if (supportsWebSockets) {
|
if (supportsWebSockets) {
|
||||||
<?php if ($REQUEST_PROTOCOL == 'https') : ?>
|
<?php if (getWebsiteConfig('websocket_url') != null) : ?>
|
||||||
var wsServerUrl = 'wss://<?php echo $_SERVER['HTTP_HOST']; ?>:9000/ws';
|
var wsServerUrl = "<?php echo getWebsiteConfig('websocket_url'); ?>";
|
||||||
<?php else : ?>
|
<?php else : ?>
|
||||||
var wsServerUrl = 'ws://<?php echo $_SERVER['HTTP_HOST']; ?>:9000/ws';
|
var wsServerUrl = 'ws://<?php echo $_SERVER['HTTP_HOST']; ?>:9000/ws';
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue