Merge pull request #1222 from umap-project/proxy-timeout
Add a timeout in proxy
This commit is contained in:
commit
0531ca4700
1 changed files with 1 additions and 1 deletions
|
@ -336,7 +336,7 @@ class AjaxProxy(View):
|
|||
request = Request(url, headers=headers)
|
||||
opener = build_opener()
|
||||
try:
|
||||
proxied_request = opener.open(request)
|
||||
proxied_request = opener.open(request, timeout=10)
|
||||
except HTTPError as e:
|
||||
return HttpResponse(e.msg, status=e.code, content_type="text/plain")
|
||||
except URLError:
|
||||
|
|
Loading…
Reference in a new issue