diff --git a/nginx-1.19.3/src/http/modules/ngx_http_grpc_module.c b/nginx-1.19.3/src/http/modules/ngx_http_grpc_module.c index d4af66db..10d3aaed 100644 --- a/nginx-1.19.9/src/http/modules/ngx_http_grpc_module.c +++ b/nginx-1.19.9/src/http/modules/ngx_http_grpc_module.c @@ -8,6 +8,9 @@ #include #include #include +#if (NGX_HTTP_LUA_KONG) +#include +#endif typedef struct { @@ -733,6 +736,10 @@ ngx_http_grpc_create_request(ngx_http_request_t *r) len = sizeof(ngx_http_grpc_connection_start) - 1 + sizeof(ngx_http_grpc_frame_t); /* headers frame */ +#if (NGX_HTTP_LUA_KONG) + ngx_http_lua_kong_set_grpc_authority(r, &ctx->host); +#endif + /* :method header */ if (r->method == NGX_HTTP_GET || r->method == NGX_HTTP_POST) {