Files
Momento/memento-note/middleware.ts
sepehr ba6f0e9290
Some checks failed
Deploy to Production / Build and Deploy (push) Failing after 43s
fix: add missing NoteHistory migration, fix manifest 403, add API error logging
- Commit untracked 20260428150000_add_note_history migration (creates
  NoteHistory table + noteHistory column) that was causing 500s in prod
- Exclude static files (.json, .svg, .ico, etc.) from auth middleware
  to fix manifest.json 403
- Add console.error to echo API routes for production debug visibility

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-28 21:37:22 +02:00

11 lines
482 B
TypeScript

import NextAuth from 'next-auth';
import { authConfig } from './auth.config';
// NOTE: NextAuth middleware API may change in Next.js 16+.
// See: https://nextjs.org/docs/app/building-your-application/routing/middleware
export default NextAuth(authConfig).auth;
export const config = {
// https://nextjs.org/docs/app/building-your-application/routing/middleware#matcher
matcher: ['/((?!api|_next/static|_next/image|uploads|.*\.(png|json|svg|ico|jpg|jpeg|webp|woff2?)$).*)'],
};