Configured rate limiting for the app server#149
Merged
salazarsebas merged 5 commits intoHarmonia-Development:mainfrom Sep 23, 2025
Merged
Configured rate limiting for the app server#149salazarsebas merged 5 commits intoHarmonia-Development:mainfrom
salazarsebas merged 5 commits intoHarmonia-Development:mainfrom
Conversation
Contributor
|
Hey @benedictfred , please fix the errors thrown by the workflow. According to the output, the packages were added to the package json but the npm install command was not run, so the lock was not generated as expected. |
Contributor
Author
|
GM @salazarsebas |
Contributor
|
Gm @benedictfred , this is the new error: https://github.com/Harmonia-Development/harmonia-dapp/actions/runs/17927554053/job/50993672359?pr=149 |
Contributor
Author
|
@salazarsebas |
Contributor
Author
|
@salazarsebas |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This pull request introduces rate limiting to the
stellar-walletservice to help prevent abuse and excessive requests to key endpoints. It adds a new middleware for rate limiting, applies it to the authentication, KYC, and wallet routes, and includes configuration options and tests to verify the middleware's behavior.Changes made
Rate limiting implementation:
rate-limit.tsmiddleware using theexpress-rate-limitpackage, with separate limiters for authentication, KYC, and wallet endpoints (authLimiter,kycLimiter,walletLimiter). Each limiter is configured with appropriate limits and response messages./auth,/kyc, and/walletroutes inindex.ts.RATE_LIMIT_WINDOW_MS,RATE_LIMIT_MAX) to.env.exampleto allow configuration of rate limiting parameters.Dependency and configuration updates:
express-rate-limitas a dependency inservices/stellar-wallet/package.jsonto support rate limiting middleware.package.jsonto include Stellar SDK-related packages in thepnpmconfiguration.Testing:
rate-limit.test.ts, verifying that each limiter behaves as expected and enforces limits.Linked Issue
The PR closes issue #140
Screenshots
@salazarsebas
Please review. If there are changes to be made, tell me. Thanks.