mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +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
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@hydrooj/hydrojudge",
|
||||
"bin": "bin/hydrojudge.js",
|
||||
"version": "2.18.0",
|
||||
"version": "2.18.1",
|
||||
"main": "package.json",
|
||||
"author": "undefined <i@undefined.moe>",
|
||||
"repository": "https://github.com/hydro-dev/Hydro.git",
|
||||
|
||||
@@ -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