mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-30 01:10:04 +02:00
Add timeout to RDAP request
This commit is contained in:
parent
a4c4bba610
commit
ea4b4e2dae
1 changed files with 1 additions and 2 deletions
|
@ -100,7 +100,6 @@ def available(request, domain=""):
|
||||||
return json_response
|
return json_response
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@require_http_methods(["GET"])
|
@require_http_methods(["GET"])
|
||||||
@login_not_required
|
@login_not_required
|
||||||
# Since we cache domain RDAP data, cache time may need to be re-evaluated this if we encounter any memory issues
|
# Since we cache domain RDAP data, cache time may need to be re-evaluated this if we encounter any memory issues
|
||||||
|
@ -113,7 +112,7 @@ def rdap(request, domain=""):
|
||||||
if "." not in domain:
|
if "." not in domain:
|
||||||
domain = f"{domain}.gov"
|
domain = f"{domain}.gov"
|
||||||
|
|
||||||
rdap_data = requests.get(RDAP_URL.format(domain=domain)).json()
|
rdap_data = requests.get(RDAP_URL.format(domain=domain), timeout=5).json()
|
||||||
return JsonResponse(rdap_data)
|
return JsonResponse(rdap_data)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue