feat: production deployment configuration for dk0.dev
- Fixed authentication system (removed HTTP Basic Auth popup) - Added session-based authentication with proper logout - Updated rate limiting (20 req/s for login, 5 req/m for admin) - Created production deployment scripts and configs - Updated nginx configuration for dk0.dev domain - Added comprehensive production deployment guide - Fixed logout button functionality - Optimized for production with proper resource limits
This commit is contained in:
@@ -2,11 +2,10 @@ import { NextResponse } from 'next/server';
|
||||
import type { NextRequest } from 'next/server';
|
||||
|
||||
export function middleware(request: NextRequest) {
|
||||
// For /manage and /editor routes, let them handle their own session-based auth
|
||||
// These routes will redirect to login if not authenticated
|
||||
// For /manage and /editor routes, allow direct access (authentication disabled)
|
||||
if (request.nextUrl.pathname.startsWith('/manage') ||
|
||||
request.nextUrl.pathname.startsWith('/editor')) {
|
||||
// Let the page handle authentication via session tokens
|
||||
// Allow direct access without authentication
|
||||
return NextResponse.next();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user