From: Eugene Grebenschikov Date: Thu, 12 Mar 2026 00:57:05 +0000 (-0700) Subject: Fixed the "include" directive inside the "geo" block. X-Git-Tag: release-1.29.8~10 X-Git-Url: http://www.kaiwu.me/postgresql/commit/?a=commitdiff_plain;h=0de6e878ba43b55dd23b437c5be1819a55f63ec4;p=nginx.git Fixed the "include" directive inside the "geo" block. The "include" directive should be able to include multiple files if given a filename mask. Completes remaining changes introduced in da4ffd8. Closes: https://github.com/nginx/nginx/issues/1165 --- diff --git a/src/http/modules/ngx_http_geo_module.c b/src/http/modules/ngx_http_geo_module.c index 619a5fde8..5018e1abb 100644 --- a/src/http/modules/ngx_http_geo_module.c +++ b/src/http/modules/ngx_http_geo_module.c @@ -645,7 +645,12 @@ ngx_http_geo(ngx_conf_t *cf, ngx_command_t *dummy, void *conf) if (ngx_strcmp(value[0].data, "include") == 0) { - rv = ngx_http_geo_include(cf, ctx, &value[1]); + if (strpbrk((char *) value[1].data, "*?[") == NULL) { + rv = ngx_http_geo_include(cf, ctx, &value[1]); + + } else { + rv = ngx_conf_include(cf, dummy, conf); + } goto done; diff --git a/src/stream/ngx_stream_geo_module.c b/src/stream/ngx_stream_geo_module.c index c109dc72e..316de9286 100644 --- a/src/stream/ngx_stream_geo_module.c +++ b/src/stream/ngx_stream_geo_module.c @@ -605,7 +605,12 @@ ngx_stream_geo(ngx_conf_t *cf, ngx_command_t *dummy, void *conf) if (ngx_strcmp(value[0].data, "include") == 0) { - rv = ngx_stream_geo_include(cf, ctx, &value[1]); + if (strpbrk((char *) value[1].data, "*?[") == NULL) { + rv = ngx_stream_geo_include(cf, ctx, &value[1]); + + } else { + rv = ngx_conf_include(cf, dummy, conf); + } goto done; }