Atualli commited on
Commit
a3ec249
·
1 Parent(s): 229eb2b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -1
app.py CHANGED
@@ -47,7 +47,18 @@ def testeface():
47
  @ app.route('/getresource', methods=['GET'])
48
  def getresource():
49
  res = request.args.get('r')
50
- return app.send_static_file(res)
 
 
 
 
 
 
 
 
 
 
 
51
 
52
  @ app.route('/novo-front/<file>')
53
  def novofront(file):
 
47
  @ app.route('/getresource', methods=['GET'])
48
  def getresource():
49
  res = request.args.get('r')
50
+ #return app.send_static_file(res)
51
+ newurl = 'http://painel.atualli.com/getresource?r='+res
52
+
53
+ res = requests.get(newurl)
54
+
55
+ headers = [
56
+ (k,v) for k,v in res.raw.headers.items()
57
+ ]
58
+
59
+ response = Response(res.content, res.status_code, headers)
60
+
61
+ return response
62
 
63
  @ app.route('/novo-front/<file>')
64
  def novofront(file):