ventaubain commented on issue #10417:
URL: https://github.com/apache/apisix/issues/10417#issuecomment-1785461458

   I test with:
   
   ```
   {
     "uri": "/*",
     "name": "test",
     "hosts": [
       "httpbin"
     ],
     "plugins": {
       "real-ip": {
         "recursive": false,
         "source": "http_x_forwarded_for",
         "trusted_addresses": [
           "127.0.0.0/24", "10.0.10.220"
         ]
       },
       "response-rewrite": {
         "body_base64": false,
         "headers": {
           "remote_addr": "$remote_addr",
           "remote_port": "$remote_port"
         }
       }
     },
     "upstream": {
       "nodes": [
         {
           "host": "10.0.6.191",
           "port": 80,
           "weight": 100
         }
       ],
       "type": "roundrobin",
       "hash_on": "vars",
       "scheme": "http",
       "pass_host": "pass",
       "name": "default_httpbin_80",
       "desc": "Created by apisix-ingress-controller, DO NOT modify it 
manually",
       "labels": {
         "managed-by": "apisix-ingress-controller"
       }
     },
     "status": 1
   }
   ```
   
   I obtain:
   
   ```
    access-control-allow-credentials: true 
    access-control-allow-origin: http://httpbin:32080 
    connection: keep-alive 
    content-length: 91 
    content-type: application/json 
    date: Mon, 30 Oct 2023 15:11:54 GMT 
    freeform: fggf 
    remote-addr: 10.0.10.220 
    remote-port: 52316 
    server: APISIX/3.6.0 
   ```
   
   My "real" ip is also: 10.0.10.220 and logs retun `2023/10/30 15:14:07 [warn] 
49#49: *737214 [lua] real-ip.lua:147: phase_func(): missing real address, 
client: 10.0.10.220, server: _, request: "HEAD /response-headers HTTP/1.1", 
host: "httpbin.ccg:32080"`
   
   Where is my error in my route config ?


-- 
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