alpha testing feature flag
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user