On 3/16/07, Igor Sysoev <is-G...@public.gmane.org> wrote:
Although initially "limit_except" was used for authorization only,
now it allows two non-authorization directive - "proxy_pass" and "perl"
and can be use as method switches as well as "location"s are used as
URI swicther. If I will make support of several "limit_except" blocks
the directive should be even renamed to "methods_except":
location / {
methods POST {
proxy_pass ...
}
methods LOCK UNLOCK {
perl ...
}
methods_except GET {
...
}
# GET/HEAD
...
}
I like it. But why not use logical ops? e.g.
location / {
methods == POST {
proxy_pass ...
}
methods == LOCK UNLOCK {
perl ...
}
methods != GET {
...
}
# GET/HEAD
...
}
One advantage is the logical operator clearly only applies to the
argument, not to the block, and it avoids the messy natural language
semantics of "except".
Thanks for the explanation - it's very useful to know the motivating
problem behind the design.
-gregg