Hold /privacy behind a flag until counsel reads it, and fix leftover legal and email copy.

This commit is contained in:
adilallo committed 2026-11-20 15:36:06 -07:00
1 parent ead6c8f716
commit 072e5362f5
43 files changed
+548 -191

No files matched your search

+17
View File
@@ -0,0 +1,17 @@
/**
* `/privacy` stays off in production until university counsel has read the
* policy. Staging sets `ENABLE_PRIVACY_POLICY=true` (or the public alias).
* Unset or any other value is off.
*/
export function isPrivacyPolicyEnabled(): boolean {
return (
process.env.ENABLE_PRIVACY_POLICY === "true" ||
process.env.NEXT_PUBLIC_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`;
}