You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "kellyseeme (via GitHub)" <gi...@apache.org> on 2023/04/24 15:34:35 UTC
[GitHub] [apisix] kellyseeme commented on issue #9168: bug: X-Forwarded-For logic error in real-ip plugin
kellyseeme commented on issue #9168:
URL: https://github.com/apache/apisix/issues/9168#issuecomment-1520401563
> except for the first one, Each one is added to the trust list ? Why not take the first one.
>
> >
I have try to set the setting:
`{
"real-ip": {
"recursive": true,
"trusted_address": [
"10.182.40.32",
"10.182.40.32/32"
],
"source": "http_x_forwarded_for"
}
}`
use the curl to set the header:
bash-5.1# curl -H "X-forwarded-for:192.168.0.3,10.182.40.32" localhost -I
HTTP/1.1 200 OK
check the access log:
10.182.40.32 - localhost HEAD / HTTP/1.1 200 0 0.001 curl/7.80.0 10.123.67.241:80 200 0.001 http://localhost
this have no effect.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org