(wrap-rate-limit handler)(wrap-rate-limit handler opts)Rate limiting middleware that limits requests by IP or custom key. Options can be configured via endpoint metadata: {:rate-limit {:window-ms 900000 ;; 15 minutes :max-requests 100 ;; requests per window :key-fn :remote-addr ;; function to extract key from request}}
Rate limiting middleware that limits requests by IP or custom key.
Options can be configured via endpoint metadata:
{:rate-limit {:window-ms 900000 ;; 15 minutes
:max-requests 100 ;; requests per window
:key-fn :remote-addr ;; function to extract key from request}}cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |