From efcc1b18d3d290fd9998470ac3fc61fc54e0cc76 Mon Sep 17 00:00:00 2001 From: Deepak Prabhakara Date: Fri, 5 Dec 2025 17:18:08 +0000 Subject: [PATCH] chore: support VERCEL_BRANCH_URL for preview deployments (#1073) * dummy commit * Revert "dummy commit" This reverts commit a5ab4e007c7bae6ab73b73dab6d9a345232c9097. * added support for process.env.VERCEL_BRANCH_URL (preview deployments) --- lib/env.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/env.ts b/lib/env.ts index df50c4a..d7c9281 100644 --- a/lib/env.ts +++ b/lib/env.ts @@ -1,6 +1,10 @@ import { fetchPrivateKey, fetchPublicKey } from 'utils'; -const appUrl = process.env.APP_URL || `https://${process.env.VERCEL_PROJECT_PRODUCTION_URL}` || 'http://localhost:4000'; +const appUrl = + process.env.APP_URL || + `https://${process.env.VERCEL_BRANCH_URL}` || + `https://${process.env.VERCEL_PROJECT_PRODUCTION_URL}` || + 'http://localhost:4000'; const entityId = process.env.ENTITY_ID || 'https://saml.example.com/entityid'; const privateKey = fetchPrivateKey(); const publicKey = fetchPublicKey();