Add signal agent to server requests
// FREEBIE
This commit is contained in:
parent
59ac5cb9b1
commit
d4760452d1
2 changed files with 8 additions and 2 deletions
|
@ -36305,6 +36305,8 @@ var TextSecureServer = (function() {
|
||||||
if (options.contentType) {
|
if (options.contentType) {
|
||||||
xhr.setRequestHeader( "Content-Type", options.contentType );
|
xhr.setRequestHeader( "Content-Type", options.contentType );
|
||||||
}
|
}
|
||||||
|
xhr.setRequestHeader( 'X-Signal-Agent', 'OWD' );
|
||||||
|
|
||||||
|
|
||||||
xhr.onload = function() {
|
xhr.onload = function() {
|
||||||
var result = xhr.response;
|
var result = xhr.response;
|
||||||
|
@ -36618,13 +36620,14 @@ var TextSecureServer = (function() {
|
||||||
.replace('http://', 'ws://')
|
.replace('http://', 'ws://')
|
||||||
+ '/v1/websocket/?login=' + encodeURIComponent(this.username)
|
+ '/v1/websocket/?login=' + encodeURIComponent(this.username)
|
||||||
+ '&password=' + encodeURIComponent(this.password)
|
+ '&password=' + encodeURIComponent(this.password)
|
||||||
|
+ '&agent=OWD'
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
getProvisioningSocket: function () {
|
getProvisioningSocket: function () {
|
||||||
return new WebSocket(
|
return new WebSocket(
|
||||||
this.url.replace('https://', 'wss://')
|
this.url.replace('https://', 'wss://')
|
||||||
.replace('http://', 'ws://')
|
.replace('http://', 'ws://')
|
||||||
+ '/v1/websocket/provisioning/'
|
+ '/v1/websocket/provisioning/?agent=OWD'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -40,6 +40,8 @@ var TextSecureServer = (function() {
|
||||||
if (options.contentType) {
|
if (options.contentType) {
|
||||||
xhr.setRequestHeader( "Content-Type", options.contentType );
|
xhr.setRequestHeader( "Content-Type", options.contentType );
|
||||||
}
|
}
|
||||||
|
xhr.setRequestHeader( 'X-Signal-Agent', 'OWD' );
|
||||||
|
|
||||||
|
|
||||||
xhr.onload = function() {
|
xhr.onload = function() {
|
||||||
var result = xhr.response;
|
var result = xhr.response;
|
||||||
|
@ -353,13 +355,14 @@ var TextSecureServer = (function() {
|
||||||
.replace('http://', 'ws://')
|
.replace('http://', 'ws://')
|
||||||
+ '/v1/websocket/?login=' + encodeURIComponent(this.username)
|
+ '/v1/websocket/?login=' + encodeURIComponent(this.username)
|
||||||
+ '&password=' + encodeURIComponent(this.password)
|
+ '&password=' + encodeURIComponent(this.password)
|
||||||
|
+ '&agent=OWD'
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
getProvisioningSocket: function () {
|
getProvisioningSocket: function () {
|
||||||
return new WebSocket(
|
return new WebSocket(
|
||||||
this.url.replace('https://', 'wss://')
|
this.url.replace('https://', 'wss://')
|
||||||
.replace('http://', 'ws://')
|
.replace('http://', 'ws://')
|
||||||
+ '/v1/websocket/provisioning/'
|
+ '/v1/websocket/provisioning/?agent=OWD'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue