aboutsummaryrefslogtreecommitdiff
path: root/server.c
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2021-02-06 14:36:26 +0000
committerOmar Polo <op@omarpolo.com>2021-02-06 14:36:26 +0000
commitdaac4a945284dd0f8baa3f35234981f7bc0426da (patch)
tree5eb0d83e02ed2843c1f1fa51d1daa3d46bc4932c /server.c
parent4125c94fda179de8d425ce3fb70972015c80c7a4 (diff)
fix auto index precedence
Diffstat (limited to 'server.c')
-rw-r--r--server.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/server.c b/server.c
index 7a9a11c..f5b62e2 100644
--- a/server.c
+++ b/server.c
@@ -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;