mirror of
https://github.com/umami-software/umami.git
synced 2026-02-20 12:35:38 +01:00
Add collect limits.
This commit is contained in:
parent
f42cab8d83
commit
e487da72c3
13 changed files with 217 additions and 61 deletions
|
|
@ -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();
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue