feat(auth): harden session management and security
- Implement server-side session revocation on logout - Add IP extraction utility and admin setup error handling - Improve error codes and response consistency for auth endpoints - Refine landing page redirect logic to handle transient DB outages - Update deployment documentation and configuration defaults
This commit is contained in:
1 parent
935f12a1e9
commit
89e4d68690
81 files changed
+11530
-6916
No files matched your search
@@ -1,7 +1,13 @@
|
||||
import { NextResponse } from 'next/server';
|
||||
import { NextRequest, NextResponse } from 'next/server';
|
||||
import { ApiEngine } from '@/core/apiEngine/apiService';
|
||||
import { requireAdminApiSession } from '@/lib/adminAuth';
|
||||
|
||||
export async function GET(req: NextRequest) {
|
||||
const auth = await requireAdminApiSession(req);
|
||||
if (!auth.valid) {
|
||||
return auth.response;
|
||||
}
|
||||
|
||||
export async function GET() {
|
||||
try {
|
||||
const metrics = await ApiEngine.getDashboardMetrics();
|
||||
return NextResponse.json(metrics);
|
||||
|
||||
Reference in new issue
Block a user