mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
ui: auto-resize editor by default
This commit is contained in:
1 parent
cd3f8af392
commit
34cd4d62e9
5 files changed
+9
-17
No files matched your search
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "hydrooj",
|
||||
"version": "2.24.21",
|
||||
"version": "2.24.22",
|
||||
"bin": "bin/hydrooj.js",
|
||||
"main": "dist/loader.js",
|
||||
"typings": "dist/loader.d.ts",
|
||||
|
||||
@@ -423,7 +423,7 @@ export class Handler extends HandlerCommon {
|
||||
query: ctx.query,
|
||||
path: ctx.path,
|
||||
params: ctx.params,
|
||||
referer: ctx.request.headers.referer || '/',
|
||||
referer: ctx.request.headers.referer,
|
||||
json: (ctx.request.headers.accept || '').includes('application/json'),
|
||||
};
|
||||
this.response = {
|
||||
@@ -520,7 +520,7 @@ export class Handler extends HandlerCommon {
|
||||
text: global.Hydro.lib[key].text,
|
||||
}));
|
||||
if (!this.noCheckPermView) this.checkPerm(PERM.PERM_VIEW);
|
||||
if (this.request.method === 'post' && this.request.headers.referer !== '/') {
|
||||
if (this.request.method === 'post' && this.request.headers.referer) {
|
||||
const host = new URL(this.request.headers.referer).host;
|
||||
if (host !== this.request.host) throw new CsrfTokenError(host);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user