File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed
Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,8 @@ def __init__(self):
1919
2020 self .WINDOW_SIZE = settings .RATE_LIMITING_FIXED_WINDOW_SIZE
2121 self .WINDOW_LIMIT = settings .RATE_LIMITING_FIXED_WINDOW_LIMIT
22- self .redis_conn = Redis (host = settings .REDIS_DOMAIN , port = settings .REDIS_PORT )
22+ self .redis_conn = Redis (host = settings .REDIS_DOMAIN , port = settings .REDIS_PORT ,
23+ password = settings .REDIS_PASSWORD )
2324
2425 def rate_limit (self ):
2526 """ Check with the WB Redis server on whether to rate-limit a request. Returns a tuple.
Original file line number Diff line number Diff line change 3636ENABLE_RATE_LIMITING = config .get_bool ('ENABLE_RATE_LIMITING' , False )
3737REDIS_DOMAIN = config .get ('REDIS_DOMAIN' , '192.168.168.167' )
3838REDIS_PORT = config .get ('REDIS_PORT' , '6379' )
39+ REDIS_PASSWORD = config .get ('REDIS_PASSWORD' , None )
3940
4041# Number of seconds until the redis key expires
4142RATE_LIMITING_FIXED_WINDOW_SIZE = int (config .get ('RATE_LIMITING_FIXED_WINDOW_SIZE' , 3600 ))
You can’t perform that action at this time.
0 commit comments