TUN-6806: Add ingress rule number to log when filtering due to middlware handler

This commit is contained in:
João Oliveirinha 2022-10-03 10:17:11 +01:00
parent f81d35447e
commit 6be36fa2c5
1 changed files with 2 additions and 1 deletions

View File

@ -103,7 +103,8 @@ func (p *Proxy) ProxyHTTP(
ruleSpan.End()
if err, applied := p.applyIngressMiddleware(rule, req, w); err != nil {
if applied {
p.log.Error().Msg(err.Error())
rule, srv := ruleField(p.ingressRules, ruleNum)
p.logRequestError(err, cfRay, "", rule, srv)
return nil
}
return err