feat(MED-50): apply medusa middleware for cache id
This commit is contained in:
@@ -6,6 +6,7 @@ import { CsrfError, createCsrfProtect } from '@edge-csrf/nextjs';
|
||||
import { isSuperAdmin } from '@kit/admin';
|
||||
import { checkRequiresMultiFactorAuthentication } from '@kit/supabase/check-requires-mfa';
|
||||
import { createMiddlewareClient } from '@kit/supabase/middleware-client';
|
||||
import { middleware as medusaMiddleware } from "~/medusa/middleware";
|
||||
|
||||
import appConfig from '~/config/app.config';
|
||||
import pathsConfig from '~/config/paths.config';
|
||||
@@ -53,6 +54,8 @@ export async function middleware(request: NextRequest) {
|
||||
csrfResponse.headers.set('x-action-path', request.nextUrl.pathname);
|
||||
}
|
||||
|
||||
await medusaMiddleware(request as any);
|
||||
|
||||
// if no pattern handler returned a response,
|
||||
// return the session response
|
||||
return csrfResponse;
|
||||
|
||||
Reference in New Issue
Block a user