zapishis-client/apps/web/middleware.ts
vchikalkin 4a98ac5d3e Update middleware matcher to exclude 'offer' from routing
- Modified the middleware configuration to exclude the 'offer' path from the matcher, ensuring that requests to this route are handled appropriately.
2025-10-07 19:26:36 +03:00

18 lines
361 B
TypeScript

// middleware.ts
import { withAuth } from 'next-auth/middleware';
export default withAuth({
callbacks: {
authorized: ({ token }) => Boolean(token?.telegramId),
},
pages: {
signIn: '/',
},
});
export const config = {
matcher: [
'/((?!auth|browser|telegram|unregistered|privacy|offer|api|_next/static|_next/image|favicon.ico).*)',
],
};