chore(login): Remove Vercel Analytics from login application (#10701)

This PR removes the Vercel Analytics integration from the login
application to reduce external dependencies and improve privacy.

# Which Problems Are Solved

cleaner csp

# How the Problems Are Solved

- Removed dependency: Uninstalled @vercel/analytics package from
package.json
- Updated layout component: Removed Analytics import and component usage
from layout.tsx
- Updated Content Security Policy: Removed Vercel domains
(https://va.vercel-scripts.com and https://vercel.com) from CSP
configuration in csp.js
This commit is contained in:
Max Peintner
2025-09-11 12:10:09 +00:00
committed by GitHub
parent b6cbb68428
commit 1a42e99329
4 changed files with 5 additions and 47 deletions
+3 -3
View File
@@ -1,6 +1,6 @@
const ZITADEL_DOMAIN = process.env.ZITADEL_API_URL const ZITADEL_DOMAIN = process.env.ZITADEL_API_URL
? new URL(process.env.ZITADEL_API_URL).hostname ? new URL(process.env.ZITADEL_API_URL).hostname
: '*.zitadel.cloud'; : '*.zitadel.cloud';
export const DEFAULT_CSP = export const DEFAULT_CSP =
`default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval' https://va.vercel-scripts.com; connect-src 'self'; child-src; style-src 'self' 'unsafe-inline'; font-src 'self'; object-src 'none'; img-src 'self' https://vercel.com https://${ZITADEL_DOMAIN};`; `default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; connect-src 'self'; child-src; style-src 'self' 'unsafe-inline'; font-src 'self'; object-src 'none'; img-src 'self' https://${ZITADEL_DOMAIN};`;
-1
View File
@@ -36,7 +36,6 @@
"@heroicons/react": "2.1.3", "@heroicons/react": "2.1.3",
"@radix-ui/react-tooltip": "^1.2.7", "@radix-ui/react-tooltip": "^1.2.7",
"@tailwindcss/forms": "0.5.7", "@tailwindcss/forms": "0.5.7",
"@vercel/analytics": "^1.2.2",
"@zitadel/client": "latest", "@zitadel/client": "latest",
"@zitadel/proto": "latest", "@zitadel/proto": "latest",
"clsx": "1.2.1", "clsx": "1.2.1",
+2 -9
View File
@@ -6,7 +6,6 @@ import { Skeleton } from "@/components/skeleton";
import { Theme } from "@/components/theme"; import { Theme } from "@/components/theme";
import { ThemeProvider } from "@/components/theme-provider"; import { ThemeProvider } from "@/components/theme-provider";
import * as Tooltip from "@radix-ui/react-tooltip"; import * as Tooltip from "@radix-ui/react-tooltip";
import { Analytics } from "@vercel/analytics/react";
import { Lato } from "next/font/google"; import { Lato } from "next/font/google";
import { ReactNode, Suspense } from "react"; import { ReactNode, Suspense } from "react";
import type { Metadata } from "next"; import type { Metadata } from "next";
@@ -19,15 +18,10 @@ const lato = Lato({
export async function generateMetadata(): Promise<Metadata> { export async function generateMetadata(): Promise<Metadata> {
const t = await getTranslations("common"); const t = await getTranslations("common");
return { title: t('title')}; return { title: t("title") };
} }
export default async function RootLayout({ export default async function RootLayout({ children }: { children: ReactNode }) {
children,
}: {
children: ReactNode;
}) {
return ( return (
<html className={`${lato.className}`} suppressHydrationWarning> <html className={`${lato.className}`} suppressHydrationWarning>
<head /> <head />
@@ -66,7 +60,6 @@ export default async function RootLayout({
</Suspense> </Suspense>
</Tooltip.Provider> </Tooltip.Provider>
</ThemeProvider> </ThemeProvider>
<Analytics />
</body> </body>
</html> </html>
); );
-34
View File
@@ -40,9 +40,6 @@ importers:
'@tailwindcss/forms': '@tailwindcss/forms':
specifier: 0.5.7 specifier: 0.5.7
version: 0.5.7([email protected]) version: 0.5.7([email protected])
'@vercel/analytics':
specifier: ^1.2.2
version: 1.5.0([email protected](@babel/[email protected])(@playwright/[email protected])([email protected]([email protected]))([email protected])([email protected]))([email protected])
'@zitadel/client': '@zitadel/client':
specifier: workspace:* specifier: workspace:*
version: link:../../packages/zitadel-client version: link:../../packages/zitadel-client
@@ -5770,32 +5767,6 @@ packages:
cpu: [x64] cpu: [x64]
os: [win32] os: [win32]
'@vercel/[email protected]':
resolution: {integrity: sha512-MYsBzfPki4gthY5HnYN7jgInhAZ7Ac1cYDoRWFomwGHWEX7odTEzbtg9kf/QSo7XEsEAqlQugA6gJ2WS2DEa3g==}
peerDependencies:
'@remix-run/react': ^2
'@sveltejs/kit': ^1 || ^2
next: '>= 13'
react: ^18 || ^19 || ^19.0.0-rc
svelte: '>= 4'
vue: ^3
vue-router: ^4
peerDependenciesMeta:
'@remix-run/react':
optional: true
'@sveltejs/kit':
optional: true
next:
optional: true
react:
optional: true
svelte:
optional: true
vue:
optional: true
vue-router:
optional: true
'@vercel/[email protected]': '@vercel/[email protected]':
resolution: {integrity: sha512-OxDFAAdyiJ/H0b8zR9rFCu3BIb78LekBXOphOYG3snV4ULhKFX387pBPpqZ9HLiRTejBWBxYEahkw79tuIgdAA==} resolution: {integrity: sha512-OxDFAAdyiJ/H0b8zR9rFCu3BIb78LekBXOphOYG3snV4ULhKFX387pBPpqZ9HLiRTejBWBxYEahkw79tuIgdAA==}
@@ -21714,11 +21685,6 @@ snapshots:
'@unrs/[email protected]': '@unrs/[email protected]':
optional: true optional: true
'@vercel/[email protected]([email protected](@babel/[email protected])(@playwright/[email protected])([email protected]([email protected]))([email protected])([email protected]))([email protected])':
optionalDependencies:
next: 15.4.0-canary.86(@babel/[email protected])(@playwright/[email protected])([email protected]([email protected]))([email protected])([email protected])
react: 19.1.0
'@vercel/[email protected]': {} '@vercel/[email protected]': {}
'@vitejs/[email protected]([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected]))': '@vitejs/[email protected]([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected]))':