فهرست منبع

버그 수정 1

Surplus_Up (2DU) 7 سال پیش
والد
کامیت
50812f911c
3فایلهای تغییر یافته به همراه3 افزوده شده و 6 حذف شده
  1. 1 2
      route/change_password.py
  2. 1 2
      route/login.py
  3. 1 2
      route/register.py

+ 1 - 2
route/change_password.py

@@ -86,8 +86,7 @@ def change_password_2(conn, server_init):
             
             oauth_content += '</ul>'
 
-            forwarded_protocol = flask.request.headers.get('X-Forwarded-Proto', None)
-            if not forwarded_protocol or forwarded_protocol == 'http':
+            if flask.request.url.startswith('http://'):
                 http_warring = '<hr class=\"main_hr\"><span>' + load_lang('http_warring') + '</span>'
             else:
                 http_warring = ''

+ 1 - 2
route/login.py

@@ -77,8 +77,7 @@ def login_2(conn):
         if oauth_check == 0:
             oauth_content = ''
 
-        forwarded_protocol = flask.request.headers.get('X-Forwarded-Proto', None)
-        if not forwarded_protocol or forwarded_protocol == 'http':
+        if flask.request.url.startswith('http://'):
             http_warring = '<hr class=\"main_hr\"><span>' + load_lang('http_warring') + '</span>'
         else:
             http_warring = ''

+ 1 - 2
route/register.py

@@ -88,8 +88,7 @@ def register_2(conn):
         if data and data[0][0] != '':
             contract = data[0][0] + '<hr class=\"main_hr\">'
         
-        forwarded_protocol = flask.request.headers.get('X-Forwarded-Proto', None)
-        if not forwarded_protocol or forwarded_protocol == 'http':
+        if flask.request.url.startswith('http://'):
             http_warring = '<hr class=\"main_hr\"><span>' + load_lang('http_warring') + '</span>'
         else:
             http_warring = ''