parse-community / parse-community/parse-server

Cloud function specific rate limit is not working

Open
#8,684 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type:bug
Dominant language
JavaScript
Stars
21.4k
Forks
4.8k
Avg merge
7h 45m
Merged PRs (30d)
11

Description

New Issue Checklist
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.