Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can grpc request rewrite uri? #5685

Closed
gdonlyathw opened this issue Mar 15, 2020 · 5 comments
Closed

can grpc request rewrite uri? #5685

gdonlyathw opened this issue Mar 15, 2020 · 5 comments
Labels
pending author feedback Waiting for the issue author to get back to a maintainer with findings, more details, etc... task/feature Requests for new features in Kong

Comments

@gdonlyathw
Copy link

when i use kong.service.request.set_path() modify upstream_uri for Rest request,it is ok.
but for GRPC request, it is not ok.

@bungle
Copy link
Member

bungle commented Mar 17, 2020

I think you are right, this needs to be fixed. The problem I think currently is that grpc_pass does not allow path like the proxy_pass does:

http://nginx.org/en/docs/http/ngx_http_grpc_module.html#grpc_pass
vs.
http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_pass

@bungle bungle added task/feature Requests for new features in Kong task/needs-investigation Requires investigation and reproduction before classifying it as a bug or not. labels Mar 17, 2020
@bungle
Copy link
Member

bungle commented Mar 17, 2020

I am wondering though, could we call this:
https://github.com/openresty/lua-nginx-module#ngxreqset_uri

Before or after ngx.exec("@grpc") or ngx.exec("@grpcs")

@bungle
Copy link
Member

bungle commented Mar 17, 2020

Nginx 1.17.8 added:

  • Feature: variables support in the "grpc_pass" directive.

So perhaps that contains support for this. For this we need to wait for next OpenResty release.

Edit: perhaps it still doesn't support the uri/path:
https://trac.nginx.org/nginx/changeset?reponame=nginx&old=6439ef81e37dfccfc3a8c57fed278bf56014ef39%40src%2Fhttp%2Fmodules%2Fngx_http_grpc_module.c&new=6439ef81e37dfccfc3a8c57fed278bf56014ef39%40src%2Fhttp%2Fmodules%2Fngx_http_grpc_module.c

@bungle
Copy link
Member

bungle commented Mar 17, 2020

It might be even "not recommended" as of now, see e.g.:
grpc/grpc-dotnet#110
grpc/grpc#14900

@hishamhm hishamhm added pending author feedback Waiting for the issue author to get back to a maintainer with findings, more details, etc... and removed task/needs-investigation Requires investigation and reproduction before classifying it as a bug or not. labels Mar 23, 2020
@kikito
Copy link
Member

kikito commented Apr 6, 2020

It seems this is not currently feasible right now, so I'm closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pending author feedback Waiting for the issue author to get back to a maintainer with findings, more details, etc... task/feature Requests for new features in Kong
Projects
None yet
Development

No branches or pull requests

4 participants