aboutsummaryrefslogtreecommitdiff
path: root/server.c
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2023-07-23 19:04:37 +0000
committerOmar Polo <op@omarpolo.com>2023-07-23 19:04:37 +0000
commit6a8387e5f54a4d6db07aa2f3c7046f618b82aac2 (patch)
tree9c097e4ca7ea3a9b98c465d388ce13aad7679e01 /server.c
parentfdd67729b45c7073be9ea1720cbadbaae8f0d112 (diff)
add `fastcgi off' to forceful skip fastcgi for a route
Diffstat (limited to 'server.c')
-rw-r--r--server.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/server.c b/server.c
index 88479f1..3bceac6 100644
--- a/server.c
+++ b/server.c
@@ -247,6 +247,7 @@ struct location *
vhost_fastcgi(struct vhost *v, const char *path)
{
struct location *loc;
+ int force_disable = 0;
if (v == NULL || path == NULL)
return NULL;
@@ -256,8 +257,13 @@ vhost_fastcgi(struct vhost *v, const char *path)
if (loc->fcgi != -1)
if (matches(loc->match, path))
return loc;
+ if (loc->nofcgi && matches(loc->match, path))
+ force_disable = 1;
}
+ if (force_disable)
+ return NULL;
+
loc = TAILQ_FIRST(&v->locations);
return loc->fcgi == -1 ? NULL : loc;
}