mirror of https://github.com/omar-polo/gmid.git
add `fastcgi off' to forceful skip fastcgi for a route
This commit is contained in:
parent
fdd67729b4
commit
6a8387e5f5
|
@ -320,6 +320,8 @@ certificate in the ISO 8601 format
|
|||
The time corresponding to the start of the validity period of the peer
|
||||
certificate in the ISO 8601 format.
|
||||
.El
|
||||
.It Ic fastcgi off
|
||||
Disable FastCGI handling in the current location.
|
||||
.It Ic index Ar string
|
||||
Set the directory index file.
|
||||
If not specified, it defaults to
|
||||
|
|
1
gmid.h
1
gmid.h
|
@ -175,6 +175,7 @@ struct location {
|
|||
X509_STORE *reqca;
|
||||
int disable_log;
|
||||
int fcgi;
|
||||
int nofcgi;
|
||||
struct envhead params;
|
||||
|
||||
char dir[PATH_MAX];
|
||||
|
|
4
parse.y
4
parse.y
|
@ -491,6 +491,10 @@ locopt : AUTO INDEX bool { loc->auto_index = $3 ? 1 : -1; }
|
|||
|
||||
fastcgi : FASTCGI '{' optnl fastcgiopts '}'
|
||||
| FASTCGI fastcgiopt
|
||||
| FASTCGI OFF {
|
||||
loc->fcgi = -1;
|
||||
loc->nofcgi = 1;
|
||||
}
|
||||
| FASTCGI string {
|
||||
yywarn("`fastcgi path' is deprecated. "
|
||||
"Please use `fastcgi socket path' instead.");
|
||||
|
|
6
server.c
6
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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue