Skip to content

Apply rate limiting to deep-link endpoints (#1327) - #1342

Merged
RUKAYAT-CODER merged 3 commits into
rinafcode:mainfrom
lamborghini21:fix/1327-deep-link-rate-limiting
Aug 26, 2026
Merged

Apply rate limiting to deep-link endpoints (#1327)#1342
RUKAYAT-CODER merged 3 commits into
rinafcode:mainfrom
lamborghini21:fix/1327-deep-link-rate-limiting

Conversation

@lamborghini21

Copy link
Copy Markdown
Contributor

Summary

Applies request throttling to sensitive endpoints in src/deep-link/deep-link.controller.ts to protect against brute-force and abuse, per #1327.

Changes

  • Added ThrottlerGuard + @Throttle to the deep-link course redirect endpoint, with a stricter limit than the module default.
  • Registered ThrottlerModule.forRoot in deep-link.module.ts.
  • Added deep-link.config.ts to centralize rate-limit values — configurable via env vars (DEEP_LINK_RATE_LIMIT_TTL_MS, DEEP_LINK_RATE_LIMIT_DEFAULT, DEEP_LINK_RATE_LIMIT_REDIRECT) with sane defaults, no hardcoded magic numbers.
  • Added deep-link.controller.spec.ts covering:
    • Normal requests succeed within the limit.
    • Exceeding the limit returns 429 with a clear message.

Acceptance Criteria

  • Exceeding the limit returns HTTP 429.
  • Limits are documented and configurable, not hardcoded magic numbers.
  • Normal usage is unaffected.

Testing

Closes #1327

@drips-wave

drips-wave Bot commented Aug 26, 2026

Copy link
Copy Markdown

@lamborghini21 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

@RUKAYAT-CODER

Copy link
Copy Markdown
Contributor

Thank you for contributing to the project

@RUKAYAT-CODER
RUKAYAT-CODER merged commit 1ef446f into rinafcode:main Aug 26, 2026
3 checks passed
@lamborghini21
lamborghini21 deleted the fix/1327-deep-link-rate-limiting branch August 26, 2026 23:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Apply rate limiting to deep-link endpoints

2 participants