SMILEY4 / ktor-swagger-ui

Kotlin Ktor plugin to generate OpenAPI and provide Swagger UI
Apache License 2.0
156 stars 25 forks source link

Support for Rate Limiter #63

Closed x2d7751347m closed 1 year ago

x2d7751347m commented 1 year ago

Here is the rate limiter: https://ktor.io/docs/rate-limit.html

I tried it below routing { rateLimit { get("/something", { summary = "something Endpoint." response { ....

Result image

URL paths are affected by the rateLimit function.

Are there any plans to support the rate limiter?

SMILEY4 commented 1 year ago

Hi, there is no plan to directly "support" rate limiter or other plugins for this exact use-case, however, this issue can easily be fixed by adding the rate-limiter-part of the route to a list of ignored parts (PluginConfig#ignoredRouteSelectors). See https://github.com/SMILEY4/ktor-swagger-ui/issues/43 for more information.