mirror of
https://github.com/go-micro/go-micro.git
synced 2025-06-24 22:26:54 +02:00
contains missing host port
This commit is contained in:
@ -148,7 +148,7 @@ func namespaceFromRequest(req *http.Request) (string, error) {
|
||||
// fallback to req.Host
|
||||
var err error
|
||||
host, _, err = net.SplitHostPort(req.Host)
|
||||
if err != nil && err.Error() == "missing port in address" {
|
||||
if err != nil && strings.Contains(err.Error(), "missing port in address") {
|
||||
host = req.Host
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user