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
This commit is contained in:
Eugene Grebenschikov 2026-03-11 17:57:05 -07:00 committed by Eugene
parent 5ac6f49371
commit 0de6e878ba
2 changed files with 12 additions and 2 deletions

View file

@ -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;

View file

@ -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;
}