jujiale opened a new issue, #8040:
URL: https://github.com/apache/apisix/issues/8040
### Description
hello.
we are using apisix v2.12. several days ago, I asked a question:
[https://github.com/apache/apisix/issues/7978](url), then I add the follwing
config in ngx_tpl.lua
`
{% if use_apisix_openresty then %}
# For servers which obey the standard, when `:authority` is
missing,
# `host` will be used instead. When used with apisix-base, we
can do
# better by setting `:authority` directly
grpc_set_header ":authority" $upstream_host;
{% else %}
grpc_set_header "Host" $upstream_host;
{% end %}
`
then I use proxy-rewrite to modify the host. because we use apisix-base. so
**grpc_set_header "Host" $upstream_host;** could not generate in nginx.conf
when apisix start. the following is my config:
`
{
"uri": "/helloworld.Greeter/SayHello",
"name": "grpc-grpc",
"methods": [
"POST",
"GET"
],
"plugins": {
"proxy-rewrite": {
"host": "111.222.333.444"
}
},
"upstream": {
"nodes": [
{
"host": "172.25.219.22",
"port": 50051,
"weight": 1
}
],
"timeout": {
"connect": 6,
"send": 6,
"read": 6
},
"type": "roundrobin",
"scheme": "grpc",
"pass_host": "pass",
"keepalive_pool": {
"idle_timeout": 60,
"requests": 1000,
"size": 320
}
},
"status": 1
}
`
what I find is host is not modified as I mentioned in config. because we
need "host" in header to modify. **so I don't konw why when we use apisix-base.
it only set ":authority" instead of set "host"**. I am not familiar with
grpc. wish your help. thanks.
### Environment
- APISIX version (run `apisix version`):2.12
- Operating system (run `uname -a`):Linux 3.10.0-957.21.3.el7.x86_64
- OpenResty / Nginx version (run `openresty -V` or `nginx
-V`):openresty/1.21.4.1
- etcd version, if relevant (run `curl
http://127.0.0.1:9090/v1/server_info`):3.5.0
- APISIX Dashboard version, if relevant:
- Plugin runner version, for issues related to plugin runners:
- LuaRocks version, for installation issues (run `luarocks --version`):
--
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]