Skip to content

feat: add X-RateLimit response headers to throttle guard - #435

Merged
nonsobethel0-dev merged 1 commit into
Parashield-Protocol:mainfrom
aniokedianne:feat/issue-417-418-419-420
Aug 26, 2026
Merged

feat: add X-RateLimit response headers to throttle guard#435
nonsobethel0-dev merged 1 commit into
Parashield-Protocol:mainfrom
aniokedianne:feat/issue-417-418-419-420

Conversation

@aniokedianne

Copy link
Copy Markdown
Contributor

Closes #417
Closes #418
Closes #419
Closes #420

Update ThrottleGuard in src/common/guards/throttle.guard.ts to emit standard rate-limit response headers on every request:

Header Value
X-RateLimit-Limit Configured max requests per window (60)
X-RateLimit-Remaining Requests remaining in the current window
X-RateLimit-Reset Unix timestamp (seconds) when the window resets
Retry-After Seconds until retry is allowed (429 responses only)

Headers are set in a private setRateLimitHeaders helper called on both the allow and deny paths, keeping the canActivate logic clean. The injected Response object comes from context.switchToHttp().getResponse<Response>() — no new dependencies required.

@drips-wave

drips-wave Bot commented Aug 26, 2026

Copy link
Copy Markdown

@aniokedianne Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@nonsobethel0-dev
nonsobethel0-dev merged commit a05a54d into Parashield-Protocol:main Aug 26, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants