Skip to content

Commit b7d8d89

Browse files
apex-ai-netclaude
andcommitted
fix(middleware): remove explicit runtime export
Middleware automatically runs on Edge runtime in Next.js 15+. The explicit runtime='edge' export caused build error: 'the edge runtime for rendering is currently experimental' Fix: Remove runtime export - middleware is Edge by default. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 7b8bfc7 commit b7d8d89

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

middleware.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import { addSecurityHeaders } from './lib/security-headers'
44
import { validateCsrf } from './lib/csrf-edge'
55
import { logger } from './lib/logger'
66

7-
// Explicitly specify Edge runtime for Netlify Edge Functions
8-
export const runtime = 'edge'
7+
// Note: Middleware automatically runs on Edge runtime in Next.js 15+
8+
// No need to declare export const runtime = 'edge'
99

1010
const isProtectedRoute = createRouteMatcher(['/dashboard(.*)', '/student-intake', '/preceptor-intake'])
1111
const isPublicRoute = createRouteMatcher(['/sign-in(.*)', '/sign-up(.*)', '/', '/api/webhook(.*)', '/help', '/terms', '/privacy'])

0 commit comments

Comments
 (0)