[PATCH] Add Origin in WebSocket connection.
Export this patch
Hi,
I had an arror trying to connect to my Mattermost instance. It appeared the
Origin header was missing. This patch fixes this issue.
Best regards,
Alexis.
---
wee_most.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/wee_most.py b/wee_most.py
index b0e9677..26355b9 100644
--- a/wee_most.py
+++ b/wee_most.py
@@ -2565,7 +2565,7 @@ class Worker:
self.last_pong_time = 0
url = server.url.replace("http", "ws", 1) + "/api/v4/websocket"
- self.ws = create_connection(url)
+ self.ws = create_connection(url, origin=server.url)
self.ws.sock.setblocking(0)
params = {
--
2.47.1
Hi Alexis,
I don't use this plugin anymore at the moment, and I cannot test the
change but it seems harmless so I merged it anyway.
Thanks!