From 4881ea3c0d5fbd3962518513a3ec79f38b5fa4f5 Mon Sep 17 00:00:00 2001 From: erik Date: Fri, 19 Jan 2024 11:38:33 +0100 Subject: [PATCH] Refactor Keywords --- src/main/cljc/dda/c4k_forgejo/forgejo.cljc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/cljc/dda/c4k_forgejo/forgejo.cljc b/src/main/cljc/dda/c4k_forgejo/forgejo.cljc index 22befbe..7d2a5fb 100644 --- a/src/main/cljc/dda/c4k_forgejo/forgejo.cljc +++ b/src/main/cljc/dda/c4k_forgejo/forgejo.cljc @@ -138,7 +138,7 @@ ; 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? [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") (cm/replace-key-value :average max-rate)