summaryrefslogtreecommitdiffhomepage
path: root/src/http/modules/ngx_http_grpc_module.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/http/modules/ngx_http_grpc_module.c')
-rw-r--r--src/http/modules/ngx_http_grpc_module.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/http/modules/ngx_http_grpc_module.c b/src/http/modules/ngx_http_grpc_module.c
index 80046d6a4..147240a7c 100644
--- a/src/http/modules/ngx_http_grpc_module.c
+++ b/src/http/modules/ngx_http_grpc_module.c
@@ -552,6 +552,10 @@ ngx_http_grpc_handler(ngx_http_request_t *r)
ngx_http_grpc_ctx_t *ctx;
ngx_http_grpc_loc_conf_t *glcf;
+ if (r->method == NGX_HTTP_CONNECT) {
+ return NGX_HTTP_NOT_ALLOWED;
+ }
+
if (ngx_http_upstream_create(r) != NGX_OK) {
return NGX_HTTP_INTERNAL_SERVER_ERROR;
}