feat: completely remove credits and promocodes across tool pages, pricing, and all app configs
This commit is contained in:
@@ -18,8 +18,8 @@ export function checkRateLimits(
|
||||
ip: string,
|
||||
limits = { perVisitorPerDay: 5, perIpPerHour: 25, dailyBudgetCalls: 5000 }
|
||||
): { allowed: boolean; reason?: 'visitor_daily' | 'ip_hourly' | 'budget_exhausted'; remainingToday: number } {
|
||||
// Relax rate limits for local testing and development
|
||||
const isLocal = ip === '127.0.0.1' || ip === '::1' || ip === 'localhost' || !ip || process.env.NODE_ENV !== 'production';
|
||||
// Relax rate limits for local development, but respect explicit limits in test suites
|
||||
const isLocal = process.env.NODE_ENV !== 'test' && (ip === '127.0.0.1' || ip === '::1' || ip === 'localhost' || !ip || process.env.NODE_ENV !== 'production');
|
||||
const effectiveLimits = isLocal
|
||||
? { perVisitorPerDay: 10000, perIpPerHour: 10000, dailyBudgetCalls: 50000 }
|
||||
: limits;
|
||||
|
||||
Reference in New Issue
Block a user