|
@@ -15,7 +15,7 @@ def ip_check(d_type = 0):
|
|
|
try:
|
|
try:
|
|
|
ip = flask.request.environ.get('HTTP_X_REAL_IP', flask.request.environ.get('HTTP_X_FORWARDED_FOR', flask.request.remote_addr))
|
|
ip = flask.request.environ.get('HTTP_X_REAL_IP', flask.request.environ.get('HTTP_X_FORWARDED_FOR', flask.request.remote_addr))
|
|
|
|
|
|
|
|
- if ip == '::1' or ip == '127.0.0.1'):
|
|
|
|
|
|
|
+ if ip == '::1' or ip == '127.0.0.1':
|
|
|
ip = flask.request.environ.get('HTTP_X_FORWARDED_FOR', flask.request.remote_addr)
|
|
ip = flask.request.environ.get('HTTP_X_FORWARDED_FOR', flask.request.remote_addr)
|
|
|
except:
|
|
except:
|
|
|
ip = '-'
|
|
ip = '-'
|
|
@@ -68,4 +68,4 @@ def sha224(data):
|
|
|
return hashlib.sha224(bytes(data, 'utf-8')).hexdigest()
|
|
return hashlib.sha224(bytes(data, 'utf-8')).hexdigest()
|
|
|
|
|
|
|
|
def md5_replace(data):
|
|
def md5_replace(data):
|
|
|
- return hashlib.md5(data.encode()).hexdigest()
|
|
|
|
|
|
|
+ return hashlib.md5(data.encode()).hexdigest()
|