Commit
·
e47c646
1
Parent(s):
08149a2
Update main.py
Browse files
main.py
CHANGED
|
@@ -30,7 +30,7 @@ def latlon_to_pixel(loc):
|
|
| 30 |
@app.route('/proxy/<path:url>')
|
| 31 |
def proxy(url):
|
| 32 |
try:
|
| 33 |
-
req = requests.get(f'http://{url}', stream=True, timeout=
|
| 34 |
return Response(req.iter_content(chunk_size=10*1024), content_type=req.headers['content-type'])
|
| 35 |
except requests.exceptions.RequestException as e:
|
| 36 |
return send_file('static/error.png', mimetype='image/png')
|
|
|
|
| 30 |
@app.route('/proxy/<path:url>')
|
| 31 |
def proxy(url):
|
| 32 |
try:
|
| 33 |
+
req = requests.get(f'http://{url}', stream=True, timeout=10)
|
| 34 |
return Response(req.iter_content(chunk_size=10*1024), content_type=req.headers['content-type'])
|
| 35 |
except requests.exceptions.RequestException as e:
|
| 36 |
return send_file('static/error.png', mimetype='image/png')
|