mirror of
https://github.com/TitanEmbeds/Titan.git
synced 2024-12-26 06:57:04 +01:00
Fix for PyAnyw IP?
This commit is contained in:
parent
e78117e379
commit
e9aa929c3b
@ -11,7 +11,7 @@ discord_api = DiscordREST(config['bot-token'])
|
|||||||
cache = Cache()
|
cache = Cache()
|
||||||
|
|
||||||
def get_client_ipaddr():
|
def get_client_ipaddr():
|
||||||
if hasattr(request.headers, "X-Real-IP"): # pythonanywhere specific
|
if "X-Real-IP" in request.headers: # pythonanywhere specific
|
||||||
return request.headers['X-Real-IP']
|
return request.headers['X-Real-IP']
|
||||||
else: # general
|
else: # general
|
||||||
return request.remote_addr
|
return request.remote_addr
|
||||||
|
Loading…
Reference in New Issue
Block a user