forked from rDrama/rDrama
make ratelimiting work when not-proxied by cloudflare
parent
d9056abfa8
commit
6c965d1c06
|
@ -59,7 +59,9 @@ if "load_chat" in argv:
|
||||||
|
|
||||||
def get_CF():
|
def get_CF():
|
||||||
with app.app_context():
|
with app.app_context():
|
||||||
return request.headers.get('CF-Connecting-IP')
|
x = request.headers.get('CF-Connecting-IP')
|
||||||
|
if x: return x
|
||||||
|
return request.remote_addr
|
||||||
|
|
||||||
limiter = Limiter(
|
limiter = Limiter(
|
||||||
app=app,
|
app=app,
|
||||||
|
|
Loading…
Reference in New Issue