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 2021/02/02 02:18:17 UTC

[GitHub] [apisix] sandy420 opened a new issue #3480: How to implement the header set in nginx in Apisix

sandy420 opened a new issue #3480:
URL: https://github.com/apache/apisix/issues/3480


   e.g.:
   This is my configuration in nginx,and How to implement the header set in nginx in Apisix:
   
   location = / {
       more_set_input_headers "Host:qastatic.56qq.com";
   	proxy_pass http://qastatic-56qq-com-lan/firestar/;
   }
   
   -------------------------------------------
   The routing configuration information I queried in etcd:
   
   #etcdctl get --prefix '/apisix/routes/1612229377'
   /apisix/routes/1612229377
   {"update_time":1612229377,"methods":["PUT","GET","POST"],"id":"1612229377","hosts":["qa-sh-hubble.ymm-inc.com","eadmin.qa-sh.56qq.com"],"remote_addrs":["10.0.0.0\/8","0.0.0.0\/0"],"priority":0,"sta
   tus":1,"desc":"static路由测试svc1","create_time":1612229377,"uri":"\/*","name":"static路由测试svc1","enable_websocket":false,"service_id":"1612180320","**plugins":{"proxy-rewrite":{"uri":"\/firestar\/","headers":{"more_set_input_headers":"Host:qastatic.56qq.com"}}},**"upstream_id":"1612180237","vars":{}}
   ---------------------
   Excuse me, what's  wrong with my routing configuration?


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



[GitHub] [apisix] spacewander commented on issue #3480: How to implement the header set in nginx in Apisix

Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #3480:
URL: https://github.com/apache/apisix/issues/3480#issuecomment-771305795


   Please read the doc: https://github.com/apache/apisix/blob/master/doc/plugins/proxy-rewrite.md, and its example of `headers`.
   
   And you also need to read the doc of `more_set_input_headers` and `proxy_pass`. Before migrating Nginx configuration to APISIX, you should know how they work first.


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



[GitHub] [apisix] spacewander edited a comment on issue #3480: How to implement the header set in nginx in Apisix

Posted by GitBox <gi...@apache.org>.
spacewander edited a comment on issue #3480:
URL: https://github.com/apache/apisix/issues/3480#issuecomment-771305795


   Please read the doc: https://github.com/apache/apisix/blob/master/doc/plugins/proxy-rewrite.md, and its example of `headers`.
   
   And you also need to read the doc of `more_set_input_headers`. Before migrating Nginx configuration to APISIX, you should know how they work first.
   
   The `location = / {` is exact matched, but you are using `"uri":"/*"` (prefix match)...


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



[GitHub] [apisix] spacewander closed issue #3480: How to implement the header set in nginx in Apisix

Posted by GitBox <gi...@apache.org>.
spacewander closed issue #3480:
URL: https://github.com/apache/apisix/issues/3480


   


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



[GitHub] [apisix] spacewander edited a comment on issue #3480: How to implement the header set in nginx in Apisix

Posted by GitBox <gi...@apache.org>.
spacewander edited a comment on issue #3480:
URL: https://github.com/apache/apisix/issues/3480#issuecomment-771305795


   Please read the doc: https://github.com/apache/apisix/blob/master/doc/plugins/proxy-rewrite.md, and its example of `headers`.
   
   And you also need to read the doc of `more_set_input_headers`. Before migrating Nginx configuration to APISIX, you should know how they work first.
   
   The `location = / {` is exact matched, but you are using `"uri":"/*"` (prefix match)...


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



[GitHub] [apisix] spacewander commented on issue #3480: How to implement the header set in nginx in Apisix

Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #3480:
URL: https://github.com/apache/apisix/issues/3480#issuecomment-771305795


   Please read the doc: https://github.com/apache/apisix/blob/master/doc/plugins/proxy-rewrite.md, and its example of `headers`.
   
   And you also need to read the doc of `more_set_input_headers` and `proxy_pass`. Before migrating Nginx configuration to APISIX, you should know how they work first.


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