mirror of
https://activitypub.software/TransFem-org/Sharkey
synced 2024-12-21 16:00:09 +00:00
fix incorrect X-RateLimit-Remaining header
This commit is contained in:
parent
7698db88e5
commit
8239ce4282
1 changed files with 1 additions and 1 deletions
|
@ -171,7 +171,7 @@ export class SkRateLimiterService extends RateLimiterService {
|
|||
const [lim1, lim2] = await Promise.all(promises);
|
||||
return {
|
||||
blocked: (lim1?.blocked || lim2?.blocked) ?? false,
|
||||
remaining: Math.min(lim1?.remaining ?? 1, lim2?.remaining ?? 1),
|
||||
remaining: Math.min(lim1?.remaining ?? Number.MAX_SAFE_INTEGER, lim2?.remaining ?? Number.MAX_SAFE_INTEGER),
|
||||
resetSec: Math.max(lim1?.resetSec ?? 0, lim2?.resetSec ?? 0),
|
||||
resetMs: Math.max(lim1?.resetMs ?? 0, lim2?.resetMs ?? 0),
|
||||
fullResetSec: Math.max(lim1?.fullResetSec ?? 0, lim2?.fullResetSec ?? 0),
|
||||
|
|
Loading…
Reference in a new issue