[PR #5746] [MERGED] chore: apply ThrottlerBehindProxyGuard across controllers #5331

Closed
opened 2026-03-17 02:47:27 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hoppscotch/hoppscotch/pull/5746
Author: @mirarifhasan
Created: 1/5/2026
Status: Merged
Merged: 1/5/2026
Merged by: @mirarifhasan

Base: patchHead: fix/rate-limit-on-health-route


📝 Commits (1)

  • 711cd6c feat: apply ThrottlerBehindProxyGuard to controllers

📊 Changes

4 files changed (+20 additions, -3 deletions)

View changed files

📝 packages/hoppscotch-backend/src/app.controller.ts (+3 -1)
📝 packages/hoppscotch-backend/src/health/health.controller.ts (+3 -1)
📝 packages/hoppscotch-backend/src/infra-config/onboarding.controller.ts (+11 -1)
📝 packages/hoppscotch-backend/src/published-docs/published-docs.controller.ts (+3 -0)

📄 Description

Closes BE-700

What's changed

This PR addresses missing rate-limit coverage in a few backend endpoints to ensure consistent protection across the API surface.

  1. Added rate-limiting to health check APIs.
  2. Applied rate-limiting to additional controllers that were previously missed.

Notes to reviewers

No additional notes.


Summary by cubic

Applied ThrottlerBehindProxyGuard across ping, health, onboarding (v1), and published-docs (v1) controllers to enforce proxy-aware rate limiting and fix missing coverage on the health route. This addresses BE-700 and ensures consistent protection on public endpoints.

  • Bug Fixes
    • Health and ping routes are now rate-limited to prevent abuse and excessive polling.
    • Guard added at controller level so all child routes inherit the limit.

Written for commit 711cd6c601. Summary will update on new commits.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/hoppscotch/hoppscotch/pull/5746 **Author:** [@mirarifhasan](https://github.com/mirarifhasan) **Created:** 1/5/2026 **Status:** ✅ Merged **Merged:** 1/5/2026 **Merged by:** [@mirarifhasan](https://github.com/mirarifhasan) **Base:** `patch` ← **Head:** `fix/rate-limit-on-health-route` --- ### 📝 Commits (1) - [`711cd6c`](https://github.com/hoppscotch/hoppscotch/commit/711cd6c601486810c1bdcf29b765952aaebda83e) feat: apply ThrottlerBehindProxyGuard to controllers ### 📊 Changes **4 files changed** (+20 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `packages/hoppscotch-backend/src/app.controller.ts` (+3 -1) 📝 `packages/hoppscotch-backend/src/health/health.controller.ts` (+3 -1) 📝 `packages/hoppscotch-backend/src/infra-config/onboarding.controller.ts` (+11 -1) 📝 `packages/hoppscotch-backend/src/published-docs/published-docs.controller.ts` (+3 -0) </details> ### 📄 Description <!-- Thanks for creating this pull request 🤗 Please make sure that the pull request is limited to one type (docs, feature, etc.) and keep it as small as possible. You can open multiple prs instead of opening a huge one. --> <!-- If this pull request closes an issue, please mention the issue number below --> <!-- Issue # here --> Closes BE-700 <!-- Add an introduction into what this PR tries to solve in a couple of sentences --> ### What's changed <!-- Describe point by point the different things you have changed in this PR --> This PR addresses missing rate-limit coverage in a few backend endpoints to ensure consistent protection across the API surface. 1. Added rate-limiting to health check APIs. 2. Applied rate-limiting to additional controllers that were previously missed. <!-- You can also choose to add a list of changes and if they have been completed or not by using the markdown to-do list syntax - [ ] Not Completed - [x] Completed --> ### Notes to reviewers <!-- Any information you feel the reviewer should know about when reviewing your PR --> No additional notes. <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Applied ThrottlerBehindProxyGuard across ping, health, onboarding (v1), and published-docs (v1) controllers to enforce proxy-aware rate limiting and fix missing coverage on the health route. This addresses BE-700 and ensures consistent protection on public endpoints. - **Bug Fixes** - Health and ping routes are now rate-limited to prevent abuse and excessive polling. - Guard added at controller level so all child routes inherit the limit. <sup>Written for commit 711cd6c601486810c1bdcf29b765952aaebda83e. Summary will update on new commits.</sup> <!-- End of auto-generated description by cubic. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-17 02:47:27 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#5331
No description provided.