Skip to content

Commit 611f67b

Browse files
fix(proxy): strip malformed Next-Router-State-Tree headers
1 parent 2c0abbe commit 611f67b

22 files changed

Lines changed: 17677 additions & 17650 deletions

.gitignore

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
.DS_Store
2-
node_modules
3-
.turbo
4-
*.log
5-
.next
6-
dist
7-
dist-ssr
8-
*.local
9-
.env
10-
server/dist
11-
public/dist
12-
.vscode
13-
.idea
14-
.vercel
15-
.env*.local
16-
/blob-report/
17-
/out
18-
/docker
19-
/machinekey
20-
21-
.cursor
1+
.DS_Store
2+
node_modules
3+
.turbo
4+
*.log
5+
.next
6+
dist
7+
dist-ssr
8+
*.local
9+
server/dist
10+
public/dist
11+
.vscode
12+
.idea
13+
.vercel
14+
.env*.local
15+
/blob-report/
16+
/out
17+
/docker
18+
/machinekey
19+
20+
.cursor
21+
config.bat

apps/login/next-env-vars.d.ts

Lines changed: 48 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,48 @@
1-
declare namespace NodeJS {
2-
interface ProcessEnv {
3-
// Allow any environment variable that matches the pattern
4-
[key: `${string}_AUDIENCE`]: string; // The system api url
5-
[key: `${string}_SYSTEM_USER_ID`]: string; // The service user id
6-
[key: `${string}_SYSTEM_USER_PRIVATE_KEY`]: string; // The service user private key
7-
8-
AUDIENCE: string; // The fallback system api url
9-
SYSTEM_USER_ID: string; // The fallback service user id
10-
SYSTEM_USER_PRIVATE_KEY: string; // The fallback service user private key
11-
12-
/**
13-
* The Zitadel API url
14-
*/
15-
ZITADEL_API_URL: string;
16-
17-
/**
18-
* The service user token
19-
*/
20-
ZITADEL_SERVICE_USER_TOKEN: string;
21-
22-
/**
23-
* Optional: wheter a user must have verified email
24-
*/
25-
EMAIL_VERIFICATION: string;
26-
27-
/**
28-
* Optional: custom request headers to be added to every request
29-
* Split by comma, key value pairs separated by colon
30-
*/
31-
CUSTOM_REQUEST_HEADERS?: string;
32-
33-
/**
34-
* Optional: whether to enable the Zitadel API translation
35-
*/
36-
ENABLE_ZITADEL_API_TRANSLATION?: string | boolean;
37-
38-
/**
39-
* Optional: the Marker.io project id
40-
*/
41-
MARKER_IO_PROJECT_ID?: string;
42-
43-
/**
44-
* Optional: the Fathom analytics id
45-
*/
46-
FATHOM_ID?: string;
47-
}
48-
}
1+
declare namespace NodeJS {
2+
interface ProcessEnv {
3+
// Allow any environment variable that matches the pattern
4+
[key: `${string}_AUDIENCE`]: string; // The system api url
5+
[key: `${string}_SYSTEM_USER_ID`]: string; // The service user id
6+
[key: `${string}_SYSTEM_USER_PRIVATE_KEY`]: string; // The service user private key
7+
8+
AUDIENCE: string; // The fallback system api url
9+
SYSTEM_USER_ID: string; // The fallback service user id
10+
SYSTEM_USER_PRIVATE_KEY: string; // The fallback service user private key
11+
12+
/**
13+
* The Zitadel API url
14+
*/
15+
ZITADEL_API_URL: string;
16+
17+
/**
18+
* The service user token
19+
*/
20+
ZITADEL_SERVICE_USER_TOKEN: string;
21+
22+
/**
23+
* Optional: wheter a user must have verified email
24+
*/
25+
EMAIL_VERIFICATION: string;
26+
27+
/**
28+
* Optional: custom request headers to be added to every request
29+
* Split by comma, key value pairs separated by colon
30+
*/
31+
CUSTOM_REQUEST_HEADERS?: string;
32+
33+
/**
34+
* Optional: whether to enable the Zitadel API translation
35+
*/
36+
ENABLE_ZITADEL_API_TRANSLATION?: string | boolean;
37+
38+
/**
39+
* Optional: the Marker.io project id
40+
*/
41+
MARKER_IO_PROJECT_ID?: string;
42+
43+
/**
44+
* Optional: the Fathom analytics id
45+
*/
46+
FATHOM_ID?: string;
47+
}
48+
}

apps/login/package.json

Lines changed: 77 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -1,77 +1,77 @@
1-
{
2-
"name": "@zitadel/login",
3-
"private": true,
4-
"type": "module",
5-
"scripts": {
6-
"dev": "pnpm next dev --turbopack",
7-
"test:unit": "pnpm vitest",
8-
"test:unit:standalone": "pnpm test:unit",
9-
"test:unit:watch": "pnpm test:unit --watch",
10-
"lint": "pnpm exec eslint . && pnpm exec prettier --check .",
11-
"lint:fix": "pnpm exec prettier --write .",
12-
"lint-staged": "lint-staged",
13-
"build": "pnpm exec next build",
14-
"build:login:standalone": "NEXT_PUBLIC_BASE_PATH=/ui/v2/login NEXT_OUTPUT_MODE=standalone pnpm build",
15-
"start": "pnpm build && pnpm exec next start",
16-
"start:built": "pnpm exec next start",
17-
"clean": "pnpm mock:stop && rm -rf .turbo && rm -rf node_modules && rm -rf .next"
18-
},
19-
"git": {
20-
"pre-commit": "lint-staged"
21-
},
22-
"lint-staged": {
23-
"*": "prettier --write --ignore-unknown"
24-
},
25-
"dependencies": {
26-
"@headlessui/react": "^2.1.9",
27-
"@heroicons/react": "2.1.3",
28-
"@sentry/nextjs": "^10.34.0",
29-
"@tailwindcss/forms": "0.5.7",
30-
"@vercel/analytics": "^1.2.2",
31-
"@zitadel/client": "workspace:*",
32-
"@zitadel/proto": "workspace:*",
33-
"clsx": "1.2.1",
34-
"copy-to-clipboard": "^3.3.3",
35-
"deepmerge": "^4.3.1",
36-
"fathom-client": "^3.7.2",
37-
"lucide-react": "0.469.0",
38-
"moment": "^2.29.4",
39-
"next": "16.1.1",
40-
"next-intl": "^4.7.0",
41-
"next-themes": "^0.4.6",
42-
"nice-grpc": "2.0.1",
43-
"qrcode.react": "^3.1.0",
44-
"react": "19.2.3",
45-
"react-dom": "19.2.3",
46-
"react-hook-form": "7.39.5",
47-
"tinycolor2": "1.4.2",
48-
"uuid": "^11.1.0"
49-
},
50-
"devDependencies": {
51-
"@bufbuild/buf": "^1.53.0",
52-
"@testing-library/jest-dom": "^6.6.3",
53-
"@testing-library/react": "^16.3.0",
54-
"@types/ms": "2.1.0",
55-
"@types/node": "^22.14.1",
56-
"@types/react": "19.2.3",
57-
"@types/react-dom": "19.2.3",
58-
"@types/tinycolor2": "1.4.3",
59-
"@types/uuid": "^10.0.0",
60-
"@vercel/git-hooks": "1.0.0",
61-
"@zitadel/eslint-config": "workspace:*",
62-
"@zitadel/prettier-config": "workspace:*",
63-
"@zitadel/tailwind-config": "workspace:*",
64-
"@zitadel/tsconfig": "workspace:*",
65-
"autoprefixer": "10.4.21",
66-
"grpc-tools": "1.13.0",
67-
"jsdom": "^26.1.0",
68-
"lint-staged": "15.5.1",
69-
"make-dir-cli": "4.0.0",
70-
"postcss": "8.5.3",
71-
"prettier-plugin-tailwindcss": "0.6.11",
72-
"sass": "^1.87.0",
73-
"tailwindcss": "3.4.14",
74-
"ts-proto": "^2.7.0",
75-
"typescript": "^5.8.3"
76-
}
77-
}
1+
{
2+
"name": "@zitadel/login",
3+
"private": true,
4+
"type": "module",
5+
"scripts": {
6+
"dev": "pnpm next dev --turbopack",
7+
"test:unit": "pnpm vitest",
8+
"test:unit:standalone": "pnpm test:unit",
9+
"test:unit:watch": "pnpm test:unit --watch",
10+
"lint": "pnpm exec eslint . && pnpm exec prettier --check .",
11+
"lint:fix": "pnpm exec prettier --write .",
12+
"lint-staged": "lint-staged",
13+
"build": "pnpm exec next build",
14+
"build:login:standalone": "NEXT_PUBLIC_BASE_PATH=/ui/v2/login NEXT_OUTPUT_MODE=standalone pnpm build",
15+
"start": "pnpm build && pnpm exec next start",
16+
"start:built": "pnpm exec next start",
17+
"clean": "pnpm mock:stop && rm -rf .turbo && rm -rf node_modules && rm -rf .next"
18+
},
19+
"git": {
20+
"pre-commit": "lint-staged"
21+
},
22+
"lint-staged": {
23+
"*": "prettier --write --ignore-unknown"
24+
},
25+
"dependencies": {
26+
"@headlessui/react": "^2.1.9",
27+
"@heroicons/react": "2.1.3",
28+
"@sentry/nextjs": "^10.34.0",
29+
"@tailwindcss/forms": "0.5.7",
30+
"@vercel/analytics": "^1.2.2",
31+
"@zitadel/client": "workspace:*",
32+
"@zitadel/proto": "workspace:*",
33+
"clsx": "1.2.1",
34+
"copy-to-clipboard": "^3.3.3",
35+
"deepmerge": "^4.3.1",
36+
"fathom-client": "^3.7.2",
37+
"lucide-react": "0.469.0",
38+
"moment": "^2.29.4",
39+
"next": "16.1.1",
40+
"next-intl": "^4.7.0",
41+
"next-themes": "^0.4.6",
42+
"nice-grpc": "2.0.1",
43+
"qrcode.react": "^3.1.0",
44+
"react": "19.2.3",
45+
"react-dom": "19.2.3",
46+
"react-hook-form": "7.39.5",
47+
"tinycolor2": "1.4.2",
48+
"uuid": "^11.1.0"
49+
},
50+
"devDependencies": {
51+
"@bufbuild/buf": "^1.53.0",
52+
"@testing-library/jest-dom": "^6.6.3",
53+
"@testing-library/react": "^16.3.0",
54+
"@types/ms": "2.1.0",
55+
"@types/node": "^22.14.1",
56+
"@types/react": "19.2.3",
57+
"@types/react-dom": "19.2.3",
58+
"@types/tinycolor2": "1.4.3",
59+
"@types/uuid": "^10.0.0",
60+
"@vercel/git-hooks": "1.0.0",
61+
"@zitadel/eslint-config": "workspace:*",
62+
"@zitadel/prettier-config": "workspace:*",
63+
"@zitadel/tailwind-config": "workspace:*",
64+
"@zitadel/tsconfig": "workspace:*",
65+
"autoprefixer": "10.4.21",
66+
"grpc-tools": "1.13.0",
67+
"jsdom": "^26.1.0",
68+
"lint-staged": "15.5.1",
69+
"make-dir-cli": "4.0.0",
70+
"postcss": "8.5.3",
71+
"prettier-plugin-tailwindcss": "0.6.11",
72+
"sass": "^1.87.0",
73+
"tailwindcss": "3.4.14",
74+
"ts-proto": "^2.7.0",
75+
"typescript": "^5.8.3"
76+
}
77+
}

apps/login/sentry.server.config.ts

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
// This file configures the initialization of Sentry on the server.
2-
// The config you add here will be used whenever the server handles a request.
3-
// https://docs.sentry.io/platforms/javascript/guides/nextjs/
4-
5-
import * as Sentry from "@sentry/nextjs";
6-
7-
Sentry.init({
8-
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,
9-
10-
// Define how likely traces are sampled. Adjust this value in production, or use tracesSampler for greater control.
11-
tracesSampleRate: 0.1,
12-
replaysSessionSampleRate: 0.1,
13-
replaysOnErrorSampleRate: 1.0,
14-
15-
// Enable sending user PII (Personally Identifiable Information)
16-
// https://docs.sentry.io/platforms/javascript/guides/nextjs/configuration/options/#sendDefaultPii
17-
sendDefaultPii: true,
18-
});
1+
// This file configures the initialization of Sentry on the server.
2+
// The config you add here will be used whenever the server handles a request.
3+
// https://docs.sentry.io/platforms/javascript/guides/nextjs/
4+
5+
import * as Sentry from "@sentry/nextjs";
6+
7+
Sentry.init({
8+
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,
9+
10+
// Define how likely traces are sampled. Adjust this value in production, or use tracesSampler for greater control.
11+
tracesSampleRate: 0.1,
12+
replaysSessionSampleRate: 0.1,
13+
replaysOnErrorSampleRate: 1.0,
14+
15+
// Enable sending user PII (Personally Identifiable Information)
16+
// https://docs.sentry.io/platforms/javascript/guides/nextjs/configuration/options/#sendDefaultPii
17+
sendDefaultPii: true,
18+
});

0 commit comments

Comments
 (0)