mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2026-03-30 19:52:31 -04:00
If Server has a port specified, use it in the api url
This commit is contained in:
@@ -45,8 +45,8 @@ var Server = function() {
|
||||
key: 'urlToApi',
|
||||
value: function urlToApi() {
|
||||
const port = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
||||
return (location.protocol=='https:'? 'https:' : this.Protocol+':') + '//' + this.Hostname + (port ? ':' + port : '') + ((this.PathToApi && (this.PathToApi != 'null')) ? this.PathToApi : '');
|
||||
}
|
||||
return (location.protocol=='https:'? 'https:' : this.Protocol+':') + '//' + this.Hostname + (port ? ':' + port : (this.Port ? ':' + this.Port : '')) + ((this.PathToApi && (this.PathToApi != 'null')) ? this.PathToApi : '');
|
||||
}
|
||||
},
|
||||
{
|
||||
key: 'getFromApi',
|
||||
|
||||
Reference in New Issue
Block a user