doc: limit_except
Igor Sysoev
is at rambler-co.ru
Fri Mar 16 14:26:27 MSK 2007
On Fri, Mar 16, 2007 at 05:17:39AM -0600, Gregg Reynolds wrote:
> On 3/16/07, Igor Sysoev <is at rambler-co.ru> 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".
The "!=" is good for me, thank you. I think the "==" should be omitted:
methods POST ...
methods LOCK UNLOCK ...
methods != GET ...
--
Igor Sysoev
http://sysoev.ru/en/
More information about the nginx
mailing list