parse-community / parse-community/parse-server
Cloud function specific rate limit is not working
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 21.4k
- Forks
- 4.8k
- Avg merge
- 7h 45m
- Merged PRs (30d)
- 11
Description
New Issue Checklist
- [x ] I am not disclosing a vulnerability.
- [x ] I am not just asking a question.
- [x ] I have searched through existing issues.
- I can reproduce the issue with the latest version of Parse Server.
Issue Description
When I set rate limit in the cloud code, the rate limit is not working.
Steps to reproduce
When I set options on parse server config the rate limit is working, like below code.
rateLimit: {
requestPath: '/functions/someFunction',
requestTimeWindow: 15 * 60 * 1000,
requestCount: 3,
}
but i'm trying to set rate limit in the cloud code, the rate limit is not working. like below code
Parse.Cloud.define('someFunction', () => {
return 'Hello world';
}, {
rateLimit: {
requestTimeWindow: 60 * 60 * 1000,
requestCount: 3,
}
});
Server
- Parse Server version:
6.2.1 - Operating system:
Ubuntu 20 - Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc):
Local
Database
- System (MongoDB or Postgres):
MongoDB - Database version:
6.0 - Local or remote host (MongoDB Atlas, mLab, AWS, Azure, Google Cloud, etc):
Local
Client
- SDK (iOS, Android, JavaScript, PHP, Unity, etc):
JavaScript - SDK version:
4.1.0
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how Parse.Cloud.define registers the function-level rateLimit options, then compare that path with the working server config using requestPath. Reproduce the issue with the supplied someFunction examples and verify that three calls within the configured window are limited while later calls are allowed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100