Skip to content

Commit

Permalink
feat(openresty-patches) add patches needed for overriding of the :aut…
Browse files Browse the repository at this point in the history
…hority pseudo header generated by ngx_http_grpc_module
  • Loading branch information
dndx authored and gszr committed Nov 5, 2020
1 parent 1ee4f72 commit f5229f8
Showing 1 changed file with 25 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
diff --git a/nginx-1.17.8/src/http/modules/ngx_http_grpc_module.c b/nginx-1.17.8/src/http/modules/ngx_http_grpc_module.c
index d4af66db..10d3aaed 100644
--- a/nginx-1.17.8/src/http/modules/ngx_http_grpc_module.c
+++ b/nginx-1.17.8/src/http/modules/ngx_http_grpc_module.c
@@ -8,6 +8,9 @@
#include <ngx_config.h>
#include <ngx_core.h>
#include <ngx_http.h>
+#if (NGX_HTTP_LUA_KONG)
+#include <ngx_http_lua_kong_module.h>
+#endif


typedef struct {
@@ -566,6 +569,10 @@ ngx_http_grpc_handler(ngx_http_request_t *r)
}
}

+#if (NGX_HTTP_LUA_KONG)
+ ngx_http_lua_kong_set_grpc_authority(r, &ctx->host);
+#endif
+
u->output.tag = (ngx_buf_tag_t) &ngx_http_grpc_module;

u->conf = &glcf->upstream;

0 comments on commit f5229f8

Please sign in to comment.