forked from rDrama/rDrama
fix ratelimiting in wpd
parent
6250a75f00
commit
d217b3e843
|
@ -61,7 +61,7 @@ def get_CF():
|
|||
with app.app_context():
|
||||
x = request.headers.get('CF-Connecting-IP')
|
||||
if x: return x
|
||||
return request.remote_addr
|
||||
return request.headers.get('X-Forwarded-For')
|
||||
|
||||
limiter = Limiter(
|
||||
app=app,
|
||||
|
|
|
@ -18,10 +18,6 @@ def get_ID():
|
|||
else:
|
||||
x = "logged_out"
|
||||
|
||||
if x == 9:
|
||||
print(f'{SITE}-{x}', flush=True)
|
||||
print(request.headers.get('CF-Connecting-IP'), flush=True)
|
||||
print(request.remote_addr, flush=True)
|
||||
|
||||
return f'{SITE}-{x}'
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@ server {
|
|||
listen [::]:80;
|
||||
proxy_set_header Host $http_host;
|
||||
include includes/headers;
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
|
||||
location / {
|
||||
proxy_pass http://localhost:5000/;
|
||||
|
|
Loading…
Reference in New Issue