From a2e52e8914c5ae867e0e0ca23e2e8c14c6c84316 Mon Sep 17 00:00:00 2001 From: Nathan Totten Date: Mon, 9 Dec 2024 11:49:38 -0500 Subject: [PATCH] Added vercel skep protection plugin --- package-lock.json | 11 +++++++++++ package.json | 1 + vite.config.ts | 8 ++++++++ 3 files changed, 20 insertions(+) create mode 100644 vite.config.ts diff --git a/package-lock.json b/package-lock.json index 3132ef37..fd8dfda7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,6 +14,7 @@ "react": "18.3.1", "react-dom": "18.3.1", "typescript": "5.6.3", + "vite-plugin-vercel-skew-protection": "^1.0.1", "zudoku": "^0.18.3" }, "devDependencies": { @@ -1248,6 +1249,7 @@ }, "node_modules/@clack/prompts/node_modules/is-unicode-supported": { "version": "1.3.0", + "extraneous": true, "inBundle": true, "license": "MIT", "engines": { @@ -25201,6 +25203,15 @@ } } }, + "node_modules/vite-plugin-vercel-skew-protection": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/vite-plugin-vercel-skew-protection/-/vite-plugin-vercel-skew-protection-1.0.1.tgz", + "integrity": "sha512-oqpkTV3f6I8mJuyUsLEwiNmW+026YMYcdxJgmLkrsML8J8I+fcCC1p08Fk3ynm33pGRc9kwdtPk4oZ2NjXAXhQ==", + "license": "ISC", + "dependencies": { + "invariant": "^2.2.4" + } + }, "node_modules/vite/node_modules/@esbuild/aix-ppc64": { "version": "0.21.5", "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz", diff --git a/package.json b/package.json index 2807c7c4..7dfb6579 100644 --- a/package.json +++ b/package.json @@ -26,6 +26,7 @@ "react": "18.3.1", "react-dom": "18.3.1", "typescript": "5.6.3", + "vite-plugin-vercel-skew-protection": "^1.0.1", "zudoku": "^0.18.3" }, "devDependencies": { diff --git a/vite.config.ts b/vite.config.ts new file mode 100644 index 00000000..936aff2a --- /dev/null +++ b/vite.config.ts @@ -0,0 +1,8 @@ +import vercelSkewProtection from "vite-plugin-vercel-skew-protection"; + +export default { + plugins: [ + process.env.VERCEL_SKEW_PROTECTION_ENABLED === "1" && + vercelSkewProtection(), + ].filter(Boolean), +};