fix: Added hostname attribute support as it is intended

chrisr3d 2018-11-15 19:44:43 +01:00
parent eee3cf824e
commit 36fbf96a12
No known key found for this signature in database
GPG Key ID: 6BBED1B63A6D639F
1 changed files with 2 additions and 2 deletions

View File

@ -29,12 +29,12 @@ def handler(q=False):
if q is False:
return False
request = json.loads(q)
domain = request["domain"]
domain = request["domain"] if "domain" in request else request["hostname"]
# Get the extension
ext = domain.split(".")[-1]
# Check if if's a common, non country one
# Check if it's a common, non country one
if ext in common_tlds.keys():
val = common_tlds[ext]
else: