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:
Team Dark Devil committed 2026-11-18 05:18:55 +06:00
1 parent 34519c07df
commit 177ed4a844
78 files changed
+6748 -3157

No files matched your search

+25 -6
View File
@@ -1,11 +1,31 @@
import { PwaLifecycle } from '@/components/pwa/PwaLifecycle';
import { ToastProvider } from '@/components/ui/Toast';
import type { Metadata } from 'next';
import type { Metadata, Viewport } from 'next';
import './globals.css';
export const viewport: Viewport = {
themeColor: '#0a0a0b',
width: 'device-width',
initialScale: 1,
};
export const metadata: Metadata = {
title: 'DataStack - Realtime Data Collection Platform',
description: 'Self-hosted universal realtime data collection engine with Socket.IO ingestion, Redis buffer, JWT client auth, CSV batch rotation, and /vcon/ admin panel.',
manifest: '/manifest.json',
appleWebApp: {
capable: true,
statusBarStyle: 'black-translucent',
title: 'DataStack',
},
icons: {
icon: [
{ url: '/icon.svg', type: 'image/svg+xml' },
{ url: '/icon-192.png', sizes: '192x192', type: 'image/png' },
{ url: '/icon-512.png', sizes: '512x512', type: 'image/png' },
],
apple: [{ url: '/apple-touch-icon.png', sizes: '180x180', type: 'image/png' }],
},
openGraph: {
title: 'DataStack - Realtime Data Collection Platform',
description: 'Self-hosted universal realtime data collection engine with Socket.IO ingestion, Redis buffer, JWT client auth, CSV batch rotation, and /vcon/ admin panel.',
@@ -21,12 +41,11 @@ export const metadata: Metadata = {
export default function RootLayout({ children }: { children: React.ReactNode }) {
return (
<html lang="en" className="dark">
<head>
<link rel="manifest" href="/manifest.json" />
<meta name="theme-color" content="#0a0a0b" />
</head>
<body suppressHydrationWarning className="min-h-screen bg-[var(--bg-main)] text-[var(--text)] antialiased">
<ToastProvider>{children}</ToastProvider>
<ToastProvider>
{children}
<PwaLifecycle />
</ToastProvider>
</body>
</html>
);