Spaces:
Running
Running
Commit
·
6b25923
1
Parent(s):
aa57a5e
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=7)
|
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')
|