Skip to content
Permalink
Browse files

Merge pull request #194 from t4skforce/master

Support for HTTP query parameters
  • Loading branch information...
hunterlong committed Jun 6, 2019
2 parents 175f20a + 9013eb6 commit 1efd3224ec775023dcbbffd49f1fa96f399608f5
Showing with 2 additions and 8 deletions.
  1. +2 −8 core/checker.go
@@ -90,17 +90,11 @@ func (s *Service) parseHost() string {
if s.Type == "tcp" || s.Type == "udp" {
return s.Domain
} else {
domain := s.Domain
hasPort, _ := regexp.MatchString(`\:([0-9]+)`, domain)
if hasPort {
splitDomain := strings.Split(s.Domain, ":")
domain = splitDomain[len(splitDomain)-2]
}
host, err := url.Parse(domain)
u, err := url.Parse(s.Domain)
if err != nil {
return s.Domain
}
return host.Host
return strings.Split(u.Host, ":")[0]
}
}

0 comments on commit 1efd322

Please sign in to comment.
You can’t perform that action at this time.