diff --git a/packages/ui/app/src/util/withSkewProtection.ts b/packages/ui/app/src/util/withSkewProtection.ts index 1f0f93d00d..e861b3b261 100644 --- a/packages/ui/app/src/util/withSkewProtection.ts +++ b/packages/ui/app/src/util/withSkewProtection.ts @@ -1,9 +1,10 @@ +const deploymentId = process.env.NEXT_DEPLOYMENT_ID; export function withSkewProtection(headers?: HeadersInit): HeadersInit | undefined { - if (process.env.NEXT_DEPLOYMENT_ID == null) { + if (!deploymentId) { return headers; } const h = new Headers(headers); - h.set("x-deployment-id", process.env.NEXT_DEPLOYMENT_ID); + h.set("x-deployment-id", deploymentId); return h; }