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 2020/10/21 06:56:56 UTC

[GitHub] [apisix] lizeming removed a comment on issue #2468: request help: The problem of rewriting HTTP request header ‘Host’

lizeming removed a comment on issue #2468:
URL: https://github.com/apache/apisix/issues/2468#issuecomment-713351657


   This is the proxy-rewrite plugin that we configured in APISIX. The Internet IP address and port of the redirect request are written into the http header "Host" field, and the service is called back to the client according to the http header "Host" field. Before using nginx, it can be done by proxy_set_header host $http_host, but in APISIX, proxy-rewrite needs to be fixed, which is not very convenient, and this rewriting is also invalid. http header "Host" field is always without a port. I have seen that the nginx configuration of APISIX is useful to cover the "Host" field by $host, but I don't know whether $host no longer has the original port.
   
   APISIX proxy-rewrite configuration
   ![Snipaste_2020-10-21_14-03-06](https://user-images.githubusercontent.com/897138/96682433-646afa80-13ab-11eb-9f4e-ad0601ca567e.jpg)
   ![Snipaste_2020-10-21_14-03-36](https://user-images.githubusercontent.com/897138/96682439-6765eb00-13ab-11eb-8138-26d99702ede1.jpg)
   ![Snipaste_2020-10-21_14-06-06](https://user-images.githubusercontent.com/897138/96682444-6a60db80-13ab-11eb-8dc9-6ae1d847c624.jpg)
   
   Header information requested by the client
   ![Snipaste_2020-10-21_14-01-42](https://user-images.githubusercontent.com/897138/96682484-751b7080-13ab-11eb-98b7-ab61ba212d17.jpg)
   
   The 'Host' field information sent to the backend via APISIX
   ![Snipaste_2020-10-21_13-56-59](https://user-images.githubusercontent.com/897138/96682517-82d0f600-13ab-11eb-9517-d73169e148b7.jpg)
   


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

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