Refactor Keywords
This commit is contained in:
parent
38183f7bf1
commit
4881ea3c0d
1 changed files with 1 additions and 1 deletions
|
@ -138,7 +138,7 @@
|
||||||
; using :average and :burst seems sensible, :period may be interesting for fine tuning later on
|
; using :average and :burst seems sensible, :period may be interesting for fine tuning later on
|
||||||
(defn-spec generate-rate-limit-middleware pred/map-or-seq?
|
(defn-spec generate-rate-limit-middleware pred/map-or-seq?
|
||||||
[config rate-limit-config?]
|
[config rate-limit-config?]
|
||||||
(let [{:keys [max-rate max-concurrent-requests]} config] ; ToDo: Set defaults, don't read config ; refactor ":average" KW to smth more speaking
|
(let [{:keys [max-rate max-concurrent-requests]} config]
|
||||||
(->
|
(->
|
||||||
(yaml/load-as-edn "forgejo/middleware-ratelimit.yaml")
|
(yaml/load-as-edn "forgejo/middleware-ratelimit.yaml")
|
||||||
(cm/replace-key-value :average max-rate)
|
(cm/replace-key-value :average max-rate)
|
||||||
|
|
Loading…
Reference in a new issue