mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
ui: typescript language features
This commit is contained in:
1 parent
a44055d54a
commit
0bd1b5fdbd
8 files changed
+196
-109
No files matched your search
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "hydrooj",
|
||||
"version": "2.24.17",
|
||||
"version": "2.24.18",
|
||||
"bin": "bin/hydrooj.js",
|
||||
"main": "dist/loader.js",
|
||||
"typings": "dist/loader.d.ts",
|
||||
|
||||
@@ -482,6 +482,10 @@ export class Handler extends HandlerCommon {
|
||||
}
|
||||
|
||||
async init({ domainId }) {
|
||||
if (this.request.headers.referer) {
|
||||
const hostname = new URL(this.request.headers.referer).hostname;
|
||||
if (hostname !== this.request.hostname) throw new CsrfTokenError();
|
||||
}
|
||||
if (!argv.benchmark) await this.limitRate('global', 10, 88);
|
||||
const [absoluteDomain, inferDomain, bdoc] = await Promise.all([
|
||||
domain.get(domainId),
|
||||
|
||||
Reference in new issue
Block a user