TUN-3503: Matching ingress rule should not take port into account

This commit is contained in:
cthuang
2020-11-04 15:44:15 +00:00
committed by Chung Ting Huang
parent b00bfe8e0b
commit be9a558867
3 changed files with 117 additions and 17 deletions

View File

@@ -697,6 +697,7 @@ func (h *TunnelHandler) createRequest(stream *h2mux.MuxedStream) (*http.Request,
return nil, nil, errors.Wrap(err, "invalid request received")
}
h.AppendTagHeaders(req)
// For incoming requests, the Host header is promoted to the Request.Host field and removed from the Header map.
rule, _ := h.ingressRules.FindMatchingRule(req.Host, req.URL.Path)
return req, rule, nil
}