/** * `/privacy` stays off until university counsel has read the policy. * Only the runtime switch `ENABLE_PRIVACY_POLICY=true` turns it on. * A build-time `NEXT_PUBLIC_ENABLE_PRIVACY_POLICY` value does not. * Unset or any other value is off. */ export function isPrivacyPolicyEnabled(): boolean { return process.env.ENABLE_PRIVACY_POLICY === "true"; } /** Absolute /privacy URL, or null while the flag is off. */ export function privacyPolicyUrl(origin: string): string | null { if (!isPrivacyPolicyEnabled()) return null; return `${origin.replace(/\/$/, "")}/privacy`; }