Atualli commited on
Commit
cfdffcb
·
1 Parent(s): 0bb3bb0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -0
app.py CHANGED
@@ -54,7 +54,25 @@ def novofrontcss(file):
54
  @ app.route('/novo-front/img/<file>')
55
  def novofrontimg(file):
56
  return app.send_static_file('novo-front/img/'+file)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
57
 
 
58
 
59
  if __name__ == '__main__':
60
  mode = os.environ.get('FLASK_ENV', 'production')
 
54
  @ app.route('/novo-front/img/<file>')
55
  def novofrontimg(file):
56
  return app.send_static_file('novo-front/img/'+file)
57
+
58
+ @ app.route('/autentica', methods=['GET'])
59
+ def autentica(file):
60
+ email = request.args.get('email')
61
+ passw = request.args.get('passw')
62
+ newurl = 'http://painel.atualli.com/autentica?email'+email+'&passw='+passw
63
+ res = requests.request(
64
+ method = request.method,
65
+ url = newurl,
66
+ headers = {k:v for k,v in request.headers if k.lower() == 'host'},
67
+ data = request.get_data(),
68
+ cookies = request.cookies,
69
+ allow_redirects = False,
70
+ )
71
+
72
+ response = Response(res.content, res.status_code, res.headers)
73
+ return response
74
 
75
+
76
 
77
  if __name__ == '__main__':
78
  mode = os.environ.get('FLASK_ENV', 'production')