fix auto index precedence

This commit is contained in:
Omar Polo 2021-02-06 14:36:26 +00:00
parent 4125c94fda
commit daac4a9452
1 changed files with 1 additions and 1 deletions

View File

@ -121,7 +121,7 @@ vhost_auto_index(struct vhost *v, const char *path)
if (v == NULL || path == NULL)
return 0;
for (loc = v->locations; loc->match != NULL; ++loc) {
for (loc = &v->locations[1]; loc->match != NULL; ++loc) {
if (!fnmatch(loc->match, path, 0)) {
if (loc->auto_index != 0)
return loc->auto_index == 1;