judge: fix bearer token

This commit is contained in:
undefined committed 2022-05-03 21:18:55 +08:00
1 parent 5af082eac8
commit 8ba14111db
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -280,7 +280,7 @@ export default class Hydro {
log.info('正在连接 %sjudge/conn', this.config.server_url);
this.ws = new WebSocket(`${this.config.server_url.replace(/^http/i, 'ws')}judge/conn`, {
headers: {
Cookie: `sid=${this.config.cookie}`,
Authorization: `Bearer ${this.config.cookie.split('sid=')[1].split(';')[0]}`,
},
});
global.onDestroy.push(() => this.ws.close());