fix: Host header for internal xmpp rest

This commit is contained in:
2023-03-25 19:56:43 +01:00
parent 0d6bd87b16
commit 2a5f354f1f
+2 -1
View File
@@ -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"
}
},