[PR #594] [MERGED] feat: implement rate limiting functionality with configurable parameters and response headers #595

Closed
opened 2026-02-25 22:35:58 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/flyimg/flyimg/pull/594
Author: @sadok-f
Created: 11/11/2025
Status: Merged
Merged: 11/14/2025
Merged by: @sadok-f

Base: mainHead: issue#593


📝 Commits (10+)

  • fafbad3 feat: implement rate limiting functionality with configurable parameters and response headers
  • 483b582 style: format code for consistency by adding spaces around conditionals and removing unnecessary blank lines
  • 1bc8138 style: remove unnecessary blank line for improved code readability
  • eb9099b feat: implement Redis-based rate limiting and remove file-based implementation
  • 22fcda7 style: remove unnecessary blank lines
  • 49402f6 fix: conditionally enable rate limiting based on configuration parameter
  • cbd04c1 style: remove unnecessary blank lines for improved code clarity
  • 75f61a1 chore: remove rate limit strategy configuration from parameters and documentation for clarity
  • 36b0e33 chore: update rate limit storage configuration to default to memory for clarity
  • 1076920 chore: enhance rate limiting response headers and update documentation for clarity

📊 Changes

20 files changed (+2370 additions, -281 deletions)

View changed files

📝 .github/workflows/ci.yml (+12 -1)
📝 app.php (+13 -1)
📝 composer.json (+2 -1)
📝 composer.lock (+471 -275)
📝 config/parameters.yml (+28 -0)
docs/rate-limiting.md (+253 -0)
📝 mkdocs.yml (+1 -0)
📝 src/Core/Controller/DefaultController.php (+0 -1)
📝 src/Core/Entity/Image/OutputImage.php (+19 -0)
📝 src/Core/Entity/Response.php (+14 -0)
src/Core/Exception/RateLimitExceededException.php (+33 -0)
📝 src/Core/Handler/ImageHandler.php (+23 -2)
src/Core/Handler/RateLimitHandler.php (+134 -0)
src/Core/RateLimiter/FileRateLimiter.php (+171 -0)
src/Core/RateLimiter/RateLimiterFactory.php (+73 -0)
src/Core/RateLimiter/RateLimiterInterface.php (+45 -0)
src/Core/RateLimiter/RedisRateLimiter.php (+229 -0)
tests/Core/Handler/RateLimitHandlerTest.php (+166 -0)
tests/Core/RateLimiter/FileRateLimiterTest.php (+507 -0)
tests/Core/RateLimiter/RedisRateLimiterTest.php (+176 -0)

📄 Description

feat: implement rate limiting functionality with configurable parameters and response headers, closes #593


🔄 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/flyimg/flyimg/pull/594 **Author:** [@sadok-f](https://github.com/sadok-f) **Created:** 11/11/2025 **Status:** ✅ Merged **Merged:** 11/14/2025 **Merged by:** [@sadok-f](https://github.com/sadok-f) **Base:** `main` ← **Head:** `issue#593` --- ### 📝 Commits (10+) - [`fafbad3`](https://github.com/flyimg/flyimg/commit/fafbad3e9aeb6bc52c8969a659ff47686e019c6d) feat: implement rate limiting functionality with configurable parameters and response headers - [`483b582`](https://github.com/flyimg/flyimg/commit/483b5825a2016028f1982baa343df6f42096b86a) style: format code for consistency by adding spaces around conditionals and removing unnecessary blank lines - [`1bc8138`](https://github.com/flyimg/flyimg/commit/1bc81380cb19cc63d1c18a0527bd561093e33e5c) style: remove unnecessary blank line for improved code readability - [`eb9099b`](https://github.com/flyimg/flyimg/commit/eb9099b4507ab68eba44cd19019e7a5327a74ce1) feat: implement Redis-based rate limiting and remove file-based implementation - [`22fcda7`](https://github.com/flyimg/flyimg/commit/22fcda7d276f5f9603ce5446886727f6bcb1732d) style: remove unnecessary blank lines - [`49402f6`](https://github.com/flyimg/flyimg/commit/49402f63943bd9d2d7dd04654433485335b86db9) fix: conditionally enable rate limiting based on configuration parameter - [`cbd04c1`](https://github.com/flyimg/flyimg/commit/cbd04c1eb1eea2ac8f568f812f6c3f8cd6da3b68) style: remove unnecessary blank lines for improved code clarity - [`75f61a1`](https://github.com/flyimg/flyimg/commit/75f61a12dbdb22a53ef9df0edc9b7a086f695f95) chore: remove rate limit strategy configuration from parameters and documentation for clarity - [`36b0e33`](https://github.com/flyimg/flyimg/commit/36b0e330504478bf8ad90c096edd04debb3b25e8) chore: update rate limit storage configuration to default to memory for clarity - [`1076920`](https://github.com/flyimg/flyimg/commit/1076920764092a74479cd4fa71e14586e3852e6e) chore: enhance rate limiting response headers and update documentation for clarity ### 📊 Changes **20 files changed** (+2370 additions, -281 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/ci.yml` (+12 -1) 📝 `app.php` (+13 -1) 📝 `composer.json` (+2 -1) 📝 `composer.lock` (+471 -275) 📝 `config/parameters.yml` (+28 -0) ➕ `docs/rate-limiting.md` (+253 -0) 📝 `mkdocs.yml` (+1 -0) 📝 `src/Core/Controller/DefaultController.php` (+0 -1) 📝 `src/Core/Entity/Image/OutputImage.php` (+19 -0) 📝 `src/Core/Entity/Response.php` (+14 -0) ➕ `src/Core/Exception/RateLimitExceededException.php` (+33 -0) 📝 `src/Core/Handler/ImageHandler.php` (+23 -2) ➕ `src/Core/Handler/RateLimitHandler.php` (+134 -0) ➕ `src/Core/RateLimiter/FileRateLimiter.php` (+171 -0) ➕ `src/Core/RateLimiter/RateLimiterFactory.php` (+73 -0) ➕ `src/Core/RateLimiter/RateLimiterInterface.php` (+45 -0) ➕ `src/Core/RateLimiter/RedisRateLimiter.php` (+229 -0) ➕ `tests/Core/Handler/RateLimitHandlerTest.php` (+166 -0) ➕ `tests/Core/RateLimiter/FileRateLimiterTest.php` (+507 -0) ➕ `tests/Core/RateLimiter/RedisRateLimiterTest.php` (+176 -0) </details> ### 📄 Description feat: implement rate limiting functionality with configurable parameters and response headers, closes #593 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem closed this issue 2026-02-25 22:35:58 +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/flyimg#595
No description provided.