You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
nx-guitar-school/apps/vendors/pages/middleware.ts

19 lines
373 B

import {withAuth} from "next-auth/middleware";
export default withAuth({
callbacks: {
authorized: async ({req}) => {
const pathname = req.nextUrl.pathname;
if (pathname.startsWith('/_next') || pathname === '/favicon.ico' || pathname === '/__ENV.js') {
return true
}
return false
},
},
pages: {
signIn: '/sign-in'
}
})