js: Connect to /mopidy/ws without trailing slash
This is the recommended URL since the switch to Tornado as web server.
This commit is contained in:
parent
ee9d19fc6e
commit
13205bee5f
@ -44,7 +44,7 @@ Mopidy.prototype._configure = function (settings) {
|
||||
var currentHost = (typeof document !== "undefined" &&
|
||||
document.location.host) || "localhost";
|
||||
settings.webSocketUrl = settings.webSocketUrl ||
|
||||
"ws://" + currentHost + "/mopidy/ws/";
|
||||
"ws://" + currentHost + "/mopidy/ws";
|
||||
|
||||
if (settings.autoConnect !== false) {
|
||||
settings.autoConnect = true;
|
||||
|
||||
@ -48,7 +48,7 @@ buster.testCase("Mopidy", {
|
||||
document.location.host || "localhost";
|
||||
|
||||
assert.calledOnceWith(this.webSocketConstructorStub,
|
||||
"ws://" + currentHost + "/mopidy/ws/");
|
||||
"ws://" + currentHost + "/mopidy/ws");
|
||||
},
|
||||
|
||||
"does not connect when autoConnect is false": function () {
|
||||
@ -84,7 +84,7 @@ buster.testCase("Mopidy", {
|
||||
document.location.host || "localhost";
|
||||
|
||||
assert.calledOnceWith(this.webSocketConstructorStub,
|
||||
"ws://" + currentHost + "/mopidy/ws/");
|
||||
"ws://" + currentHost + "/mopidy/ws");
|
||||
},
|
||||
|
||||
"does nothing when the WebSocket is open": function () {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user