parse real client IP
This commit is contained in:
@@ -49,9 +49,12 @@ type metadata struct {
|
||||
|
||||
func (h *httpHandler) parseMetadata(md mdata.Metadata) error {
|
||||
h.md.readTimeout = mdutil.GetDuration(md, "readTimeout")
|
||||
if h.md.readTimeout <= 0 {
|
||||
if h.md.readTimeout == 0 {
|
||||
h.md.readTimeout = 15 * time.Second
|
||||
}
|
||||
if h.md.readTimeout < 0 {
|
||||
h.md.readTimeout = 0
|
||||
}
|
||||
|
||||
if m := mdutil.GetStringMapString(md, "http.header", "header"); len(m) > 0 {
|
||||
hd := http.Header{}
|
||||
|
||||
Reference in New Issue
Block a user