Baoyuantop commented on issue #12436:
URL: https://github.com/apache/apisix/issues/12436#issuecomment-3083088120

   I didn't reproduce this problem in version 3.13.0. Here are my steps:
   
   1. Deploy apisix and httpbin services
   ```
   curl -sL https://run.api7.ai/apisix/quickstart | sh
   
   docker run -d --name httpbin -p 8080:80 kennethreitz/httpbin
   ```
   
   2. create route:
   ```
   curl http://127.0.0.1:9180/apisix/admin/routes/1 -H "X-API-KEY: $admin_key" 
-X PUT -i -d '
   {
       "uri": "/anything",
       "upstream": {
           "type": "roundrobin",
           "nodes": {
               "httpbin:8080": 1
           }
       }
   }'
   ```
   
   3. Edit the local host file and add the local address
   ```
   192.168.31.149  httpbin
   ```
   
   4. Request apisix and return normally
   ```
   curl -i 127.0.0.1:9080/anything
   
   HTTP/1.1 200 OK
   Content-Type: application/json
   Content-Length: 311
   Connection: keep-alive
   Date: Thu, 17 Jul 2025 08:09:08 GMT
   Access-Control-Allow-Origin: *
   Access-Control-Allow-Credentials: true
   Server: APISIX/3.13.0
   
   {
     "args": {}, 
     "data": "", 
     "files": {}, 
     "form": {}, 
     "headers": {
       "Accept": "*/*", 
       "Host": "127.0.0.1:9080", 
       "User-Agent": "curl/8.7.1", 
       "X-Forwarded-Host": "127.0.0.1"
     }, 
     "json": null, 
     "method": "GET", 
     "origin": "192.168.97.1", 
     "url": "http://127.0.0.1/anything";
   }
   ```
   
   5. Edit the host file to the wrong address
   ```
   192.168.31.148  httpbin
   ```
   
   6. Request apisix and failed with 504, after changing the address correctly, 
you can access it normally.


-- 
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-unsubscr...@apisix.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to