refactor(auth): standardize session management and security
- Centralize secret retrieval using `getAdminSessionSecret` - Replace manual session parsing with `verifyRequestAdminSession` utility - Tighten API validation and improve security headers handling - Enforce environment variable security for production deployments
This commit is contained in:
1 parent
34519c07df
commit
177ed4a844
78 files changed
+6748
-3157
No files matched your search
@@ -9,10 +9,8 @@ import { redirect } from 'next/navigation';
|
||||
export const dynamic = 'force-dynamic';
|
||||
|
||||
export default async function LandingPage() {
|
||||
if (process.env.DATABASE_URL) {
|
||||
const isConfigured = await isAdminSetupComplete().catch(() => false);
|
||||
if (!isConfigured) redirect('/vcon/setup');
|
||||
}
|
||||
const isConfigured = await isAdminSetupComplete().catch(() => false);
|
||||
if (!isConfigured) redirect('/vcon/setup');
|
||||
|
||||
return (
|
||||
<MainLayout>
|
||||
|
||||
Reference in new issue
Block a user