Add signal agent to server requests
// FREEBIE
This commit is contained in:
@@ -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'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user