Update host config from new server
This commit is contained in:
parent
1b9d4dbd2a
commit
029bdad4ff
1 changed files with 4 additions and 3 deletions
|
|
@ -1,5 +1,6 @@
|
||||||
(function() {
|
(function() {
|
||||||
var hostname = window.location.hostname;
|
var hostname = window.location.hostname;
|
||||||
|
var origin = window.location.protocol + '//' + hostname + (window.location.port ? ':' + window.location.port : '');
|
||||||
var params = new URLSearchParams(window.location.search.slice(1));
|
var params = new URLSearchParams(window.location.search.slice(1));
|
||||||
|
|
||||||
BR.conf = {};
|
BR.conf = {};
|
||||||
|
|
@ -11,7 +12,7 @@
|
||||||
// TODO not included in permalink (better replace permalink with hash plugin)
|
// TODO not included in permalink (better replace permalink with hash plugin)
|
||||||
//BR.conf.transit = params.has('transit') && (params.get('transit') === 'true');
|
//BR.conf.transit = params.has('transit') && (params.get('transit') === 'true');
|
||||||
|
|
||||||
if (hostname === 'brouter.de') {
|
if (hostname.endsWith('brouter.de')) {
|
||||||
// online service (brouter.de) configuration
|
// online service (brouter.de) configuration
|
||||||
|
|
||||||
BR.conf.profiles = [
|
BR.conf.profiles = [
|
||||||
|
|
@ -35,8 +36,8 @@
|
||||||
'hiking-beta'
|
'hiking-beta'
|
||||||
];
|
];
|
||||||
|
|
||||||
BR.conf.host = 'http://brouter.de:443';
|
BR.conf.host = origin;
|
||||||
BR.conf.profilesUrl = 'http://brouter.de/brouter/profiles2/';
|
BR.conf.profilesUrl = origin + '/brouter/profiles2/';
|
||||||
} else {
|
} else {
|
||||||
// desktop configuration
|
// desktop configuration
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue