moved to httppb
This commit is contained in:
parent
3729df67a5
commit
867a4f973e
8
http.go
8
http.go
|
@ -126,7 +126,7 @@ func (pb *Patches) AddHttpToPB(r *http.Request) error {
|
||||||
Host: r.Host,
|
Host: r.Host,
|
||||||
Hostname: r.Header.Get("hostname"),
|
Hostname: r.Header.Get("hostname"),
|
||||||
}
|
}
|
||||||
pb.HttpRequest.Route = cleanURL(r.URL.Path)
|
// pb.HttpRequest.Route = cleanURL(r.URL.Path)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -155,9 +155,3 @@ func getClientIP(r *http.Request) string {
|
||||||
}
|
}
|
||||||
return host
|
return host
|
||||||
}
|
}
|
||||||
|
|
||||||
// remove '?' part and trailing '/'
|
|
||||||
func cleanURL(url string) string {
|
|
||||||
url = "/" + strings.Trim(url, "/")
|
|
||||||
return url
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in New Issue