We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d9ed0ae commit a4a5f13Copy full SHA for a4a5f13
lib/configuration/sample.config.json
@@ -4,6 +4,7 @@
4
"timezoneString": "svensk",
5
"dggChat": {
6
"url": "ws://localhost:8420",
7
+ "origin": "www.obamna.gg",
8
"cookieToken": "yourCookieToken",
9
"botNick": "yourBotNick"
10
},
lib/services/destinychat.js
@@ -19,12 +19,14 @@ class DestinyChat extends EventEmitter {
19
super();
20
this.logger = services.logger;
21
this.url = config.url;
22
+ this.origin = config.origin;
23
this.cookieToken = config.cookieToken;
24
this.botNick = config.botNick;
25
}
26
27
connect() {
28
this.ws = new WebSocket(this.url, {
29
+ origin: this.origin,
30
headers: { Cookie: `authtoken=${this.cookieToken}` },
31
});
32
this.ws.onopen = this.onOpen.bind(this);
0 commit comments