mirror of
https://github.com/zitadel/zitadel.git
synced 2025-11-01 00:46:23 +00:00
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:
@@ -1,6 +1,6 @@
|
||||
const ZITADEL_DOMAIN = process.env.ZITADEL_API_URL
|
||||
? new URL(process.env.ZITADEL_API_URL).hostname
|
||||
const ZITADEL_DOMAIN = process.env.ZITADEL_API_URL
|
||||
? new URL(process.env.ZITADEL_API_URL).hostname
|
||||
: '*.zitadel.cloud';
|
||||
|
||||
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};`;
|
||||
|
||||
@@ -36,7 +36,6 @@
|
||||
"@heroicons/react": "2.1.3",
|
||||
"@radix-ui/react-tooltip": "^1.2.7",
|
||||
"@tailwindcss/forms": "0.5.7",
|
||||
"@vercel/analytics": "^1.2.2",
|
||||
"@zitadel/client": "latest",
|
||||
"@zitadel/proto": "latest",
|
||||
"clsx": "1.2.1",
|
||||
|
||||
@@ -6,7 +6,6 @@ import { Skeleton } from "@/components/skeleton";
|
||||
import { Theme } from "@/components/theme";
|
||||
import { ThemeProvider } from "@/components/theme-provider";
|
||||
import * as Tooltip from "@radix-ui/react-tooltip";
|
||||
import { Analytics } from "@vercel/analytics/react";
|
||||
import { Lato } from "next/font/google";
|
||||
import { ReactNode, Suspense } from "react";
|
||||
import type { Metadata } from "next";
|
||||
@@ -19,15 +18,10 @@ const lato = Lato({
|
||||
|
||||
export async function generateMetadata(): Promise<Metadata> {
|
||||
const t = await getTranslations("common");
|
||||
return { title: t('title')};
|
||||
return { title: t("title") };
|
||||
}
|
||||
|
||||
export default async function RootLayout({
|
||||
children,
|
||||
}: {
|
||||
children: ReactNode;
|
||||
}) {
|
||||
|
||||
export default async function RootLayout({ children }: { children: ReactNode }) {
|
||||
return (
|
||||
<html className={`${lato.className}`} suppressHydrationWarning>
|
||||
<head />
|
||||
@@ -66,7 +60,6 @@ export default async function RootLayout({
|
||||
</Suspense>
|
||||
</Tooltip.Provider>
|
||||
</ThemeProvider>
|
||||
<Analytics />
|
||||
</body>
|
||||
</html>
|
||||
);
|
||||
|
||||
34
pnpm-lock.yaml
generated
34
pnpm-lock.yaml
generated
@@ -40,9 +40,6 @@ importers:
|
||||
'@tailwindcss/forms':
|
||||
specifier: 0.5.7
|
||||
version: 0.5.7(tailwindcss@3.4.14)
|
||||
'@vercel/analytics':
|
||||
specifier: ^1.2.2
|
||||
version: 1.5.0(next@15.4.0-canary.86(@babel/core@7.28.3)(@playwright/test@1.55.0)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(sass@1.90.0))(react@19.1.0)
|
||||
'@zitadel/client':
|
||||
specifier: workspace:*
|
||||
version: link:../../packages/zitadel-client
|
||||
@@ -5770,32 +5767,6 @@ packages:
|
||||
cpu: [x64]
|
||||
os: [win32]
|
||||
|
||||
'@vercel/analytics@1.5.0':
|
||||
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/git-hooks@1.0.0':
|
||||
resolution: {integrity: sha512-OxDFAAdyiJ/H0b8zR9rFCu3BIb78LekBXOphOYG3snV4ULhKFX387pBPpqZ9HLiRTejBWBxYEahkw79tuIgdAA==}
|
||||
|
||||
@@ -21714,11 +21685,6 @@ snapshots:
|
||||
'@unrs/resolver-binding-win32-x64-msvc@1.11.1':
|
||||
optional: true
|
||||
|
||||
'@vercel/analytics@1.5.0(next@15.4.0-canary.86(@babel/core@7.28.3)(@playwright/test@1.55.0)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(sass@1.90.0))(react@19.1.0)':
|
||||
optionalDependencies:
|
||||
next: 15.4.0-canary.86(@babel/core@7.28.3)(@playwright/test@1.55.0)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(sass@1.90.0)
|
||||
react: 19.1.0
|
||||
|
||||
'@vercel/git-hooks@1.0.0': {}
|
||||
|
||||
'@vitejs/plugin-basic-ssl@1.0.1(vite@4.5.5(@types/node@22.17.2)(less@4.1.3)(lightningcss@1.30.1)(sass@1.64.1)(terser@5.19.2))':
|
||||
|
||||
Reference in New Issue
Block a user