Actualizar 'main.py'
This commit is contained in:
parent
900ed58fe8
commit
13d799b2e7
4
main.py
4
main.py
@ -67,8 +67,8 @@ def generate_next_url(type, ip_branch):
|
|||||||
@app.route('/')
|
@app.route('/')
|
||||||
def show_qr_and_list():
|
def show_qr_and_list():
|
||||||
# TODO: reject direct connections to server; allow access only via proxy
|
# TODO: reject direct connections to server; allow access only via proxy
|
||||||
# get_list = requests.get('https://erp.agofer.com/hr_attendance_extended/public/attendance/').json()
|
get_list = requests.get('https://erp.agofer.com/hr_attendance_extended/public/attendance/').json()
|
||||||
get_list = requests.get('http://137.184.126.24:8080/hr_attendance_extended/public/attendance/').json()
|
# get_list = requests.get('http://137.184.126.24:8080/hr_attendance_extended/public/attendance/').json()
|
||||||
list_ips = get_list["list_ips"]
|
list_ips = get_list["list_ips"]
|
||||||
ip_branch = request.environ.get('HTTP_X_REAL_IP', request.remote_addr)
|
ip_branch = request.environ.get('HTTP_X_REAL_IP', request.remote_addr)
|
||||||
if ip_branch in list_ips:
|
if ip_branch in list_ips:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user