Skip to content

Commit f3a5587

Browse files
authored
feat: allow grpc_set_header to set :authority (#61)
1 parent 58457bf commit f3a5587

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
diff --git src/http/modules/ngx_http_grpc_module.c src/http/modules/ngx_http_grpc_module.c
2+
index 58332866..01c0f489 100644
3+
--- src/http/modules/ngx_http_grpc_module.c
4+
+++ src/http/modules/ngx_http_grpc_module.c
5+
@@ -4621,6 +4621,13 @@ ngx_http_grpc_init_headers(ngx_conf_t *cf, ngx_http_grpc_loc_conf_t *conf,
6+
conf->host_set = 1;
7+
}
8+
9+
+#if (NGX_HTTP_APISIX)
10+
+ if (src[i].key.len == 10
11+
+ && ngx_strncasecmp(src[i].key.data, (u_char *) ":authority", 10) == 0)
12+
+ {
13+
+ conf->host_set = 1;
14+
+ }
15+
+#endif
16+
s = ngx_array_push(&headers_merged);
17+
if (s == NULL) {
18+
return NGX_ERROR;

0 commit comments

Comments
 (0)