middleware.ts 507 B

123456789101112131415161718
  1. import { withAuth } from "@kinde-oss/kinde-auth-nextjs/middleware";
  2. export default withAuth(
  3. async function middleware() {
  4. },
  5. {
  6. isReturnToCurrentPage: true,
  7. // Middleware still runs on all routes, but doesn't protect the blog route
  8. publicPaths: ["/"],
  9. }
  10. );
  11. export const config = {
  12. matcher: [
  13. // Run on everything but Next internals and static files
  14. '/((?!_next|[^?]*\\.(?:html?|css|js(?!on)|jpe?g|webp|png|gif|svg|ttf|woff2?|ico|csv|docx?|xlsx?|zip|webmanifest)).*)',
  15. ],
  16. };