fix: bump asset versions to force cache bust; price rate limit own bucket

- app.js and style.css versioned to 20260507a so browsers load new code
- get_shopping_price / get_all_shopping_prices moved to dedicated 'price'
  rate-limit bucket (60 req/min) separate from general (120 req/min)
  to avoid false 429s during sequential per-item price loading
This commit is contained in:
dadaloop82
2026-05-07 17:34:04 +00:00
parent 5f510c0451
commit 3a9f0ccf79
2 changed files with 8 additions and 2 deletions
+6
View File
@@ -115,11 +115,17 @@ function checkRateLimit(string $action): void {
$loginActions = [];
$recipeActions = ['generate_recipe', 'generate_recipe_stream'];
$errorActions = ['report_error', 'check_update'];
$priceActions = ['get_shopping_price', 'get_all_shopping_prices'];
if (in_array($action, $aiActions)) {
$limit = 15;
$window = 60;
$bucket = 'ai';
} elseif (in_array($action, $priceActions)) {
// Price lookups: up to 30 items × a few retries per minute, shared bucket
$limit = 60;
$window = 60;
$bucket = 'price';
} elseif (in_array($action, $recipeActions)) {
$limit = 5;
$window = 60;