fix: Host header for internal xmpp rest
This commit is contained in:
+2
-1
@@ -140,13 +140,14 @@ function setMucData(actor, muc, data) {
|
||||
} else {
|
||||
authHeader = "Basic " + new Buffer("prosody:" + config.prosodyRESTsecret).toString("base64");
|
||||
}
|
||||
console.log(moment().format("LTS") + " [xmpp-rest] messageStanza", messageStanza);
|
||||
console.log(moment().format("LTS") + " [xmpp-rest] messageStanza", messageStanza);
|
||||
request.post(
|
||||
{
|
||||
url: config.prosodyRESTUrl,
|
||||
body: messageStanza,
|
||||
headers: {
|
||||
"Authorization" : authHeader,
|
||||
"Host" : config.mucDomain.split("conference.")[1],
|
||||
"Content-Type": "text/xml"
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user