From a4dc29fb2bc7fff3eb1231e576883d1101c03b0d Mon Sep 17 00:00:00 2001 From: emil-lengman Date: Sat, 22 Aug 2020 22:12:54 +0200 Subject: [PATCH] its supposed to be milliseconds --- Dockerfile | 6 +++--- docker-entrypoint.js | 16 ++++++++-------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Dockerfile b/Dockerfile index 34a06e3..dd53efc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -42,14 +42,14 @@ ENV KEYGENERATOR_TYPE=phonetic \ KEYGENERATOR_KEYSPACE= ENV RATELIMITS_NORMAL_TOTAL_REQUESTS=500\ - RATELIMITS_NORMAL_EVERY_SECONDS=60000 \ + RATELIMITS_NORMAL_EVERY_MILLISECONDS=60000 \ RATELIMITS_WHITELIST_TOTAL_REQUESTS= \ - RATELIMITS_WHITELIST_EVERY_SECONDS= \ + RATELIMITS_WHITELIST_EVERY_MILLISECONDS= \ # comma separated list for the whitelisted \ RATELIMITS_WHITELIST=example1.whitelist,example2.whitelist \ \ RATELIMITS_BLACKLIST_TOTAL_REQUESTS= \ - RATELIMITS_BLACKLIST_EVERY_SECONDS= \ + RATELIMITS_BLACKLIST_EVERY_MILLISECONDS= \ # comma separated list for the blacklisted \ RATELIMITS_BLACKLIST=example1.blacklist,example2.blacklist ENV DOCUMENTS=about=./about.md diff --git a/docker-entrypoint.js b/docker-entrypoint.js index f8912de..05b29da 100644 --- a/docker-entrypoint.js +++ b/docker-entrypoint.js @@ -23,12 +23,12 @@ const { KEYGENERATOR_TYPE, KEY_GENERATOR_KEYSPACE, RATE_LIMITS_NORMAL_TOTAL_REQUESTS, - RATE_LIMITS_NORMAL_EVERY_SECONDS, + RATE_LIMITS_NORMAL_EVERY_MILLISECONDS, RATE_LIMITS_WHITELIST_TOTAL_REQUESTS, - RATE_LIMITS_WHITELIST_EVERY_SECONDS, + RATE_LIMITS_WHITELIST_EVERY_MILLISECONDS, RATE_LIMITS_WHITELIST, RATE_LIMITS_BLACKLIST_TOTAL_REQUESTS, - RATE_LIMITS_BLACKLIST_EVERY_SECONDS, + RATE_LIMITS_BLACKLIST_EVERY_MILLISECONDS, RATE_LIMITS_BLACKLIST, DOCUMENTS, } = process.env; @@ -64,22 +64,22 @@ const config = { categories: { normal: { totalRequests: RATE_LIMITS_NORMAL_TOTAL_REQUESTS, - every: RATE_LIMITS_NORMAL_EVERY_SECONDS, + every: RATE_LIMITS_NORMAL_EVERY_MILLISECONDS, }, whitelist: - RATE_LIMITS_WHITELIST_EVERY_SECONDS || + RATE_LIMITS_WHITELIST_EVERY_MILLISECONDS || RATE_LIMITS_WHITELIST_TOTAL_REQUESTS ? { totalRequests: RATE_LIMITS_WHITELIST_TOTAL_REQUESTS, - every: RATE_LIMITS_WHITELIST_EVERY_SECONDS, + every: RATE_LIMITS_WHITELIST_EVERY_MILLISECONDS, } : null, blacklist: - RATE_LIMITS_BLACKLIST_EVERY_SECONDS || + RATE_LIMITS_BLACKLIST_EVERY_MILLISECONDS || RATE_LIMITS_BLACKLIST_TOTAL_REQUESTS ? { totalRequests: RATE_LIMITS_WHITELIST_TOTAL_REQUESTS, - every: RATE_LIMITS_BLACKLIST_EVERY_SECONDS, + every: RATE_LIMITS_BLACKLIST_EVERY_MILLISECONDS, } : null, },