mirror of
https://github.com/TitanEmbeds/Titan.git
synced 2025-12-19 05:57:04 +01:00
Remove pythonanywhere specific ip handling
This commit is contained in:
@@ -13,10 +13,7 @@ from titanembeds.discordrest import DiscordREST
|
|||||||
discord_api = DiscordREST(config['bot-token'])
|
discord_api = DiscordREST(config['bot-token'])
|
||||||
|
|
||||||
def get_client_ipaddr():
|
def get_client_ipaddr():
|
||||||
if "X-Real-IP" in request.headers: # pythonanywhere specific
|
ip = request.remote_addr
|
||||||
ip = request.headers['X-Real-IP']
|
|
||||||
else: # general
|
|
||||||
ip = request.remote_addr
|
|
||||||
return hashlib.sha512((config['app-secret'] + ip).encode('utf-8')).hexdigest()[:15]
|
return hashlib.sha512((config['app-secret'] + ip).encode('utf-8')).hexdigest()[:15]
|
||||||
|
|
||||||
def generate_session_key():
|
def generate_session_key():
|
||||||
|
|||||||
Reference in New Issue
Block a user