mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-24 13:48:45 +00:00
fix(login): respect branding themeMode for theme toggle, fix CSP (#11903)
Closes #11721 # Which Problems Are Solved The login app now correctly handles the themeMode from branding settings: - Hide toggle when themeMode is LIGHT or DARK — the theme is forced, users cannot switch - Show 3-option toggle (light / system / dark) when themeMode is AUTO or UNSPECIFIED # How the Problems Are Solved - Introduced a `BrandingContext` to pass `themeMode` from `ThemeWrapper` down to `ThemeSwitch` # Additional Changes - removed the CSP from next.config.ts to prevent a precedency issue where the CSP was actually not applied
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import createNextIntlPlugin from "next-intl/plugin";
|
||||
import { DEFAULT_CSP } from "./constants/csp.js";
|
||||
|
||||
const withNextIntl = createNextIntlPlugin();
|
||||
|
||||
@@ -20,10 +19,6 @@ const secureHeaders = [
|
||||
key: "X-XSS-Protection",
|
||||
value: "1; mode=block",
|
||||
},
|
||||
{
|
||||
key: "Content-Security-Policy",
|
||||
value: DEFAULT_CSP,
|
||||
},
|
||||
{ key: "X-Frame-Options", value: "deny" },
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user