mirror of
https://github.com/TitanEmbeds/Titan.git
synced 2024-12-25 14:37:02 +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()
|
||||
|
||||
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']
|
||||
else: # general
|
||||
return request.remote_addr
|
||||
|
Loading…
Reference in New Issue
Block a user