alpha testing feature flag

This commit is contained in:
jackiettran
2025-10-30 16:16:27 -04:00
parent ee3a6fd8e1
commit 71ce2c63fb
4 changed files with 51 additions and 30 deletions

View File

@@ -8,6 +8,11 @@ const router = express.Router();
// Helper function to check if user has alpha access
async function checkAlphaAccess(req) {
// Bypass alpha access check if feature is disabled
if (process.env.ALPHA_TESTING_ENABLED !== 'true') {
return true;
}
// Check 1: Valid alpha access cookie
if (req.cookies && req.cookies.alphaAccessCode) {
const { code } = req.cookies.alphaAccessCode;