You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/02/28 01:16:35 UTC

[GitHub] [apisix] liangliang4ward commented on issue #6430: request help: Why in the case of upstream multiple nodes, set pass_host = node, nodes can only use domain name, not ip directly, otherwise host will be set to 127.0.0.1:9080

liangliang4ward commented on issue #6430:
URL: https://github.com/apache/apisix/issues/6430#issuecomment-1053762407


   > > > it does not take effect. It only takes effect when nodes.host is domain name.
   > > 
   > > 
   > > I don't quite understand what you mean by not taking effect. What do you expect set `pass_host == node` to be, and what is the Host header that APISIX proxies to upstream? In fact, what is the Host header that you get from the APISIX proxy to the upstream?
   > 
   > set `pass_host == node` while set nodes:
   > 
   > ```
   >     "nodes": [
   >       {
   >         "host": "192.168.0.1",
   >         "port": 80,
   >         "weight": 1
   >       },
   >       {
   >         "host": "192.168.0.2",
   >         "port": 80,
   >         "weight": 1
   >       }
   >     ],
   > ```
   > 
   > the actual Host header to upstream is unexpected: `http://127.0.0.1:9080`, expected: `https://192.168.0.1` or `https://192.168.0.2`
   > 
   > while set nodes:
   > 
   > ```
   >     "nodes": [
   >       {
   >         "host": "ly.sylc1.com",
   >         "port": 80,
   >         "weight": 1
   >       },
   >       {
   >         "host": "ly.sylc2.com",
   >         "port": 80,
   >         "weight": 1
   >       }
   >     ],
   > ```
   > 
   > the actual Host header to upstream is expected: `http://ly.sylc1.com` or `http://ly.sylc2.com`.
   
   how did you check


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