neon_arch commited on
Commit
d451fdd
1 Parent(s): 65f5a4a

✨ feat: add new config option to configure rate limiting middleware (#203)

Browse files
Files changed (1) hide show
  1. websurfx/config.lua +8 -1
websurfx/config.lua CHANGED
@@ -10,6 +10,10 @@ production_use = false -- whether to use production mode or not (in other words
10
  -- if production_use is set to true
11
  -- There will be a random delay before sending the request to the search engines, this is to prevent DDoSing the upstream search engines from a large number of simultaneous requests.
12
  request_timeout = 30 -- timeout for the search requests sent to the upstream search engines to be fetched (value in seconds).
 
 
 
 
13
 
14
  -- ### Website ###
15
  -- The different colorschemes provided are:
@@ -34,4 +38,7 @@ theme = "simple" -- the theme name which should be used for the website
34
  redis_url = "redis://127.0.0.1:8082" -- redis connection url address on which the client should connect on.
35
 
36
  -- ### Search Engines ###
37
- upstream_search_engines = { DuckDuckGo = true, Searx = false } -- select the upstream search engines from which the results should be fetched.
 
 
 
 
10
  -- if production_use is set to true
11
  -- There will be a random delay before sending the request to the search engines, this is to prevent DDoSing the upstream search engines from a large number of simultaneous requests.
12
  request_timeout = 30 -- timeout for the search requests sent to the upstream search engines to be fetched (value in seconds).
13
+ rate_limiter = {
14
+ number_of_requests = 20, -- The number of request that are allowed within a provided time limit.
15
+ time_limit = 3, -- The time limit in which the quantity of requests that should be accepted.
16
+ }
17
 
18
  -- ### Website ###
19
  -- The different colorschemes provided are:
 
38
  redis_url = "redis://127.0.0.1:8082" -- redis connection url address on which the client should connect on.
39
 
40
  -- ### Search Engines ###
41
+ upstream_search_engines = {
42
+ DuckDuckGo = true,
43
+ Searx = false,
44
+ } -- select the upstream search engines from which the results should be fetched.