@@ -191,13 +191,15 @@ looks like this:
191191> %syntax%
192192> [cgi][key] {
193193> [match][key] [match [match2...]][subkey]
194+ > [except][key] [match [match2...]][subkey]
194195> [exec][key] [script [args...]][subkey]
195196> [env][key] [key1=val1 [key2=val2...]][subkey]
196197> [pass_env][key] [key1 [key2...]][subkey]
197198> }
198199~rg~
199200 cgi {
200201 match match [match2...]
202+ except match [match2...]
201203 exec script [args...]
202204 env key1=val1 [key2=val2...]
203205 pass_env key1 [key2...]
@@ -208,14 +210,20 @@ For example,
208210
209211 cgi {
210212 match /sample/*.php /sample/app/*.php
213+ except /sample/init.php
211214 exec /usr/local/cgi-bin/phpwrap /usr/local/cgi-bin{match}
212215 env DB=/usr/local/share/app/app.db SECRET=/usr/local/share/app/secret
213216 pass_env HOME UID
214217 }
215218
216219With the advanced syntax, the `exec` subdirective must appear exactly once. The
217- `match` subdirective must appear at least once. The `env` and `pass_env`
218- subdirectives can appear any reasonable number of times.
220+ `match` subdirective must appear at least once. The `env`, `pass_env`, and
221+ `except` subdirectives can appear any reasonable number of times.
222+
223+ The `except` subdirective uses the same pattern matching logic that is used
224+ with the `match` subdirective. Any request that matches a `match` pattern is
225+ then checked with the patterns in `except`, if any. If any matches are made
226+ with the `except` pattern, the request is rejected.
219227
220228The values associated with environment variable keys are all subject to
221229placeholder substitution, just as with the script name and arguments.
0 commit comments