-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(openresty-patches) add patches needed for overriding of the :aut…
…hority pseudo header generated by ngx_http_grpc_module
- Loading branch information
Showing
1 changed file
with
25 additions
and
0 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
openresty-patches/patches/1.17.8.2/nginx-1.17.8_04-grpc_authority_override.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |