Skip to content

Release v2.0.2

Latest
Compare
Choose a tag to compare
@JeffersonGibin JeffersonGibin released this 29 Apr 00:09
· 1 commit to main since this release

Added

  • Redis Support: Implementation of rate limit management directly via Redis to enhance scalability and performance.
    • New properties strategyCache and redis added to the ISettings interface.
    • Refer to the documentation for more details on how to use these properties.
  • Added IP validation, now that your API receive x-forwarded-for header this is validated.
  • Added method getIP with method is possible get IP with base on x-forwarded-for header
  • Created an example of using Redis with Docker, Redis and Nginx. If you want to learn more, check out the examples directory

Changed

  • Custom Cache Configuration: It is now necessary to add strategyCache: "CUSTOM" when using a custom cache.
  • Rename the field in the CustomCache interface, which is used in the return type of the Custom Cache interface. The fields now do not have underscores

Important Notes

  • Incompatibility: The changes made may affect users who are using previous versions and rely on the default in-memory cache configuration.
    • Users utilizing in-memory cache will not need to make changes to their existing code.
    • Users who implement custom caches will need to adjust their settings to continue functioning correctly.

Referencies PR