change should disregard ingress rules without specified location

This commit is contained in:
regnaio 2022-03-29 07:38:48 -04:00
parent 98a9571da9
commit 571011d06d
1 changed files with 9 additions and 7 deletions

View File

@ -80,6 +80,7 @@ func (p *Proxy) ProxyHTTP(
}
p.logRequest(req, logFields)
if rule.Location != "" {
fmt.Println(fmt.Sprintf("before: req.URL.Path: %s", req.URL.Path))
parts := strings.Split(req.URL.Path, "/")
fmt.Println("parts:", parts)
@ -88,6 +89,7 @@ func (p *Proxy) ProxyHTTP(
}
req.URL.Path = path.Clean(strings.Join(parts, "/"))
fmt.Println(fmt.Sprintf("after: req.URL.Path: %s", req.URL.Path))
}
switch originProxy := rule.Service.(type) {
case ingress.HTTPOriginProxy: