Skip to content

Commit a4a5f13

Browse files
add origin on dgg ws client connect
1 parent d9ed0ae commit a4a5f13

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

lib/configuration/sample.config.json

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"timezoneString": "svensk",
55
"dggChat": {
66
"url": "ws://localhost:8420",
7+
"origin": "www.obamna.gg",
78
"cookieToken": "yourCookieToken",
89
"botNick": "yourBotNick"
910
},

lib/services/destinychat.js

+2
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,14 @@ class DestinyChat extends EventEmitter {
1919
super();
2020
this.logger = services.logger;
2121
this.url = config.url;
22+
this.origin = config.origin;
2223
this.cookieToken = config.cookieToken;
2324
this.botNick = config.botNick;
2425
}
2526

2627
connect() {
2728
this.ws = new WebSocket(this.url, {
29+
origin: this.origin,
2830
headers: { Cookie: `authtoken=${this.cookieToken}` },
2931
});
3032
this.ws.onopen = this.onOpen.bind(this);

0 commit comments

Comments
 (0)