🛡️ Sentinel: [HIGH] Fix missing rate limiting on /api/exif/[id]
Co-authored-by: ralksta <16941050+ralksta@users.noreply.github.com>
This commit is contained in:
@@ -29,10 +29,12 @@ function parseEnv(): Env {
|
||||
const apiKey = process.env.IMMICH_API_KEY || '';
|
||||
|
||||
const cacheTtlStr = process.env.CACHE_TTL;
|
||||
const cacheTtl = cacheTtlStr && !isNaN(parseInt(cacheTtlStr, 10)) ? parseInt(cacheTtlStr, 10) : 300;
|
||||
const cacheTtl =
|
||||
cacheTtlStr && !isNaN(parseInt(cacheTtlStr, 10)) ? parseInt(cacheTtlStr, 10) : 300;
|
||||
|
||||
const rateLimitStr = process.env.RATE_LIMIT_RPM;
|
||||
const rateLimit = rateLimitStr && !isNaN(parseInt(rateLimitStr, 10)) ? parseInt(rateLimitStr, 10) : 600;
|
||||
const rateLimit =
|
||||
rateLimitStr && !isNaN(parseInt(rateLimitStr, 10)) ? parseInt(rateLimitStr, 10) : 600;
|
||||
|
||||
return {
|
||||
IMMICH_API_URL: apiUrl,
|
||||
|
||||
Reference in New Issue
Block a user