feat(mission-control): restore MC tabs - temple, office, memory, claude, pdf-viewer, resume, resume-upload, temple-3d, demos
Also added: - Memory API endpoints - Briefs API endpoints - AnveVoice stats API - Claude spawn API - TTS proxy - Cleopatra voice widget - api-auth middleware
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
import { NextRequest, NextResponse } from 'next/server';
|
||||
|
||||
const API_SECRET = process.env.API_SECRET || 'horus-mc-secret-2026';
|
||||
|
||||
export function withAuth(handler: (req: NextRequest) => Promise<NextResponse>) {
|
||||
return async (req: NextRequest) => {
|
||||
const authHeader = req.headers.get('authorization');
|
||||
const expectedToken = `Bearer ${API_SECRET}`;
|
||||
|
||||
if (authHeader !== expectedToken) {
|
||||
return NextResponse.json({ error: 'Unauthorized' }, { status: 401 });
|
||||
}
|
||||
|
||||
return handler(req);
|
||||
};
|
||||
}
|
||||
|
||||
export { API_SECRET };
|
||||
Reference in New Issue
Block a user