Spaces:
Running
Running
Commit
·
c40d1a5
1
Parent(s):
920be1e
Update main.py
Browse files
main.py
CHANGED
@@ -33,7 +33,7 @@ def proxy(url):
|
|
33 |
req = requests.get(f'http://{url}', stream=True, timeout=20)
|
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
|
37 |
|
38 |
@app.route('/')
|
39 |
def index():
|
|
|
33 |
req = requests.get(f'http://{url}', stream=True, timeout=20)
|
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')
|
37 |
|
38 |
@app.route('/')
|
39 |
def index():
|