-
-
Notifications
You must be signed in to change notification settings - Fork 387
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add [DOMAIN_EXPIRATION] placeholder for monitoring domain expiration using WHOIS #325
Conversation
…ation using WHOIS
Codecov Report
@@ Coverage Diff @@
## master #325 +/- ##
==========================================
- Coverage 82.97% 82.89% -0.08%
==========================================
Files 54 54
Lines 3864 3899 +35
==========================================
+ Hits 3206 3232 +26
- Misses 514 518 +4
- Partials 144 149 +5
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
if endpoint.DNS != nil { | ||
result.Hostname = strings.TrimSuffix(endpoint.URL, ":53") | ||
} else { | ||
urlObject, err := url.Parse(endpoint.URL) | ||
if err != nil { | ||
result.AddError(err.Error()) | ||
return | ||
} | ||
result.Hostname = urlObject.Hostname() | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That didn't belong there in the first place, not sure why I put that there.
…doesn't already exist This will prevent temporary issues with the parsing of old results that would otherwise have a value of NULL for domain_expiration Fixes an issue introduced by #325
Summary
Closes #133
This feature allows users to monitor domain expiration by leveraging the WHOIS protocol through the TwiN/whois library.
Here's an example of what an endpoint configured to monitor
Checklist
README.md
, if applicable.