shreemaan-abhishek commented on issue #9493:
URL: https://github.com/apache/apisix/issues/9493#issuecomment-1641962044

   @kayx23, the `source` attribute expects nginx variables, not IP addresses 
directly. The correct usage would be to prefix the ngx variable with a `$`. 
Like so:
   
   ```bash
   curl http://127.0.0.1:9180/apisix/admin/global_rules/1 -H "X-API-KEY: xxx" 
-X PUT  -d '{
      "plugins":{
         "real-ip":{
            "source": "$http_x_forwarded_for"
         }
      }
   }'
   
   ```


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to