Skip to content
This repository has been archived by the owner on Feb 25, 2024. It is now read-only.

Add rate limiting #13

Merged
merged 1 commit into from
Aug 10, 2023
Merged

Add rate limiting #13

merged 1 commit into from
Aug 10, 2023

Conversation

michaeldev5
Copy link
Collaborator

@michaeldev5 michaeldev5 commented Aug 6, 2023

Description

This PR introduces a significant enhancement to the project by implementing rate limiting and API key functionality, along with the integration of reCAPTCHA verification during the API key generation process. These additions collectively enhance security, prevent abuse, DDOS attacks and ensure controlled access to the API.

Main Contributions

  • Implemented rate limiting mechanisms within the backend, controlling the number of HTTP requests to the API within a specified time frame.
  • Introduced API key generation and management functionality, allowing users to generate and utilize API keys for authorized access to the API.
  • Integrated reCAPTCHA verification during the API key generation process, ensuring that requests are made by legitimate users.
  • Added sensitive variables into .env file

Requests Limitations

  • Users without an API key have a limit of 20 requests per minute.
  • Once an API key is generated, users with the API key can make up to 100 requests per minute.

Note

  • The generated API key must be included in the X-API-KEY header of all subsequent API requests to ensure proper authorization and access control.
  • Before starting a nest.js application make sure you have .env file created

@michaeldev5 michaeldev5 self-assigned this Aug 6, 2023
@michaeldev5 michaeldev5 force-pushed the feature/rate-limiting branch 2 times, most recently from 0022d29 to 72c0b86 Compare August 6, 2023 20:00
@michaeldev5 michaeldev5 marked this pull request as ready for review August 6, 2023 20:09
@michaeldev5 michaeldev5 requested a review from dudo50 August 6, 2023 20:09
@dudo50 dudo50 self-assigned this Aug 6, 2023
@dudo50
Copy link
Contributor

dudo50 commented Aug 6, 2023

This PR will be addressed after 10th August.

@michaeldev5 michaeldev5 merged commit 22b7184 into main Aug 10, 2023
1 check passed
@michaeldev5 michaeldev5 deleted the feature/rate-limiting branch August 10, 2023 13:36
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants