mirror of
https://github.com/umami-software/umami.git
synced 2026-02-20 20:45:39 +01:00
Merge branch 'master' into db-merge-test
This commit is contained in:
commit
00a7272ec7
44 changed files with 3303 additions and 228 deletions
|
|
@ -3,7 +3,12 @@ import cors from 'cors';
|
|||
import { getSession } from './session';
|
||||
import { parseAuthToken, parseShareToken } from './auth';
|
||||
|
||||
export const useCors = createMiddleware(cors());
|
||||
export const useCors = createMiddleware(
|
||||
cors({
|
||||
// Cache CORS preflight request 24 hours by default
|
||||
maxAge: process.env.CORS_MAX_AGE || 86400,
|
||||
}),
|
||||
);
|
||||
|
||||
export const useSession = createMiddleware(async (req, res, next) => {
|
||||
let session;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue