mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
judge: fix bearer token
This commit is contained in:
1 parent
5af082eac8
commit
8ba14111db
2 files changed
+2
-2
No files matched your search
@@ -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());
|
||||
|
||||
Reference in new issue
Block a user