fix: handle IPs, avoid wrong parent-domain lookups, cache whois results
- Bare IP addresses and non-domain hosts (localhost, IPv6) now return a null expiry instead of throwing, so they no longer spam error logs. - Extract the registrable domain with tldts instead of walking up hostname labels, so a subdomain can never accidentally return its parent domain's expiry date. - Cache WHOIS lookups per registrable domain (1h positive, 10min negative) so visiting details pages does not re-query the registry every time. Addresses review feedback on #3834.
This commit is contained in:
1 parent
e5959ca91d
commit
75516a220d
7 files changed
+160
-53
No files matched your search
+4
-2
@@ -7191,10 +7191,12 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"domain": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"nullable": true
|
||||
},
|
||||
"expiryDate": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"nullable": true
|
||||
}
|
||||
},
|
||||
"required": ["domain", "expiryDate"]
|
||||
|
||||
Reference in new issue
Block a user