Add collect limits.

This commit is contained in:
Brian Cao 2022-12-31 13:42:03 -08:00
parent f42cab8d83
commit e487da72c3
13 changed files with 217 additions and 61 deletions

View file

@ -13,7 +13,7 @@ const log = debug('umami:middleware');
export const useCors = createMiddleware(cors());
export const useSession = createMiddleware(async (req, res, next) => {
export const useSession = createMiddleware(async (req: any, res, next) => {
const session = await findSession(req);
if (!session) {
@ -21,7 +21,7 @@ export const useSession = createMiddleware(async (req, res, next) => {
return badRequest(res);
}
(req as any).session = session;
req.session = session;
next();
});