Skip to content

Commit 0de6e87

Browse files
committed
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: nginx#1165
1 parent 5ac6f49 commit 0de6e87

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

src/http/modules/ngx_http_geo_module.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -645,7 +645,12 @@ ngx_http_geo(ngx_conf_t *cf, ngx_command_t *dummy, void *conf)
645645

646646
if (ngx_strcmp(value[0].data, "include") == 0) {
647647

648-
rv = ngx_http_geo_include(cf, ctx, &value[1]);
648+
if (strpbrk((char *) value[1].data, "*?[") == NULL) {
649+
rv = ngx_http_geo_include(cf, ctx, &value[1]);
650+
651+
} else {
652+
rv = ngx_conf_include(cf, dummy, conf);
653+
}
649654

650655
goto done;
651656

src/stream/ngx_stream_geo_module.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,12 @@ ngx_stream_geo(ngx_conf_t *cf, ngx_command_t *dummy, void *conf)
605605

606606
if (ngx_strcmp(value[0].data, "include") == 0) {
607607

608-
rv = ngx_stream_geo_include(cf, ctx, &value[1]);
608+
if (strpbrk((char *) value[1].data, "*?[") == NULL) {
609+
rv = ngx_stream_geo_include(cf, ctx, &value[1]);
610+
611+
} else {
612+
rv = ngx_conf_include(cf, dummy, conf);
613+
}
609614

610615
goto done;
611616
}

0 commit comments

Comments
 (0)