Harden authentication, tenant isolation and security boundaries

This commit is contained in:
t.indorf
2026-10-09 22:49:55 +02:00
parent ec3f4f933d
commit 656ada80bd
71 changed files with 3107 additions and 1200 deletions
+6 -2
View File
@@ -1,3 +1,5 @@
import { getSession } from "@/lib/auth-utils";
import { headers } from "next/headers";
import type { Metadata } from "next";
import { Manrope } from "next/font/google";
import "./globals.css";
@@ -44,11 +46,13 @@ export const metadata: Metadata = {
},
};
export default function RootLayout({
export default async function RootLayout({
children,
}: Readonly<{
children: React.ReactNode;
}>) {
const [requestHeaders, session] = await Promise.all([headers(), getSession()]);
const nonce = requestHeaders.get("x-nonce") ?? undefined;
return (
<html
lang="de"
@@ -56,7 +60,7 @@ export default function RootLayout({
>
<body className="min-h-full flex flex-col">
{children}
<UmamiAnalytics />
<UmamiAnalytics nonce={nonce} enabled={!session?.user?.id} />
<Toaster />
</body>
</html>