Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
[gateway] Request not logged when X-Forwarded-For header contains host with port number #2937
We noticed recently that a request sent through an azure web appliction gateway does not appear in the logs. However, when we send an identical request directly to the gateway directly it is logged perfectly. So it seems that the app gateway is adding something to the request that causes the behavior.
Further investigations turned out that azure's application gateway tends to deliver not only the client's IP address but a combination of IP:PORT in the X-Forwarded-For (XFF) header which is not the case when we send the request to the gateway directly using postman. Gravitee's implementation seems to have trouble using this as no logs appear in elasticsearch when a request comes in through an azure app gateway.
The Headers which are added by the gateway are:
However, the request is processed nevertheless.
A message should be logged in elasticsearch when sent through azure's web application gateway.
A message is not logged in elasticsearch when sent through azure's web application gateway. No exception is thrown in the gravitee logback system.
Gravitee should be able to deal with the format IP:PORT for components in XFF header.
Steps to Reproduce (for bugs)
pick any API on gravitee and set proxy log on for client and proxy
Gravitee behind an azure application gateway.
Gravitee 1.30 on docker 18.06 on CentOS 7.4