core: fix load

This commit is contained in:
undefined committed 2025-03-04 10:01:55 +08:00
1 parent aeb9d4cf50
commit dec3170524
3 files changed
+20 -6

No files matched your search

+4 -2
View File
@@ -5,7 +5,9 @@ import proxy from 'koa-proxies';
import cache from 'koa-static-cache';
import { type FindCursor, ObjectId } from 'mongodb';
import {
ConnectionHandler as ConnectionHandlerOriginal, Handler as HandlerOriginal, HydroError, NotFoundError, UserFacingError,
ConnectionHandler as ConnectionHandlerOriginal,
Handler as HandlerOriginal, HydroError, NotFoundError, UserFacingError,
WebService,
} from '@hydrooj/framework';
import { errorMessage, Time } from '@hydrooj/utils';
import { Context } from '../context';
@@ -130,7 +132,7 @@ export class ConnectionHandler extends ConnectionHandlerOriginal<Context> {
}
export async function apply(ctx: Context) {
ctx.plugin(require('@hydrooj/framework'), {
ctx.plugin(WebService, {
keys: system.get('session.keys'),
proxy: !!system.get('server.xproxy') || !!system.get('server.xff'),
cors: system.get('server.cors') || '',