doc: limit_except

Gregg Reynolds dev at mobileink.com
Thu Mar 15 23:51:47 MSK 2007


On 3/15/07, Igor Sysoev <is at rambler-co.ru> wrote:
>
> The correct name should be "limit_methods_except". For example
>
>      limit_methods_except  GET {
>          allow   ...
>          deny    all;
>      }
>
> All methods expect GET/HEAD are allowed to the specified hosts.

Thanks, I see.  Are you willing to accept suggestions for syntax
improvement?  I ask because I've been working on documentation for
nginx and, being a bit of a fanatic about clarity and simplicity, I
have some ideas in that area.  And well-chosen names can make a huge
difference - like between instant recognition and an hour's worth of
experimenting to find out what is really meant.

"limit_except" is a good example of a bad name.  To be honest, I
consider it an excellent candidate for the Atrocious Name Hall of
Fame.  We can blame Apache.  ;)  I can think of 50 different ways to
express it better.  I agree with you that "method" should probably be
in the name.  But there are other ways, too.  I would get rid of
"limit", for example; that's not the real meaning.  In fact, in my
opinion it's quite misleading; since I think of limits as having to do
with bounds on something that wants to grow, I waste time thinking in
the wrong direction when trying to understand it.  But "limit_except"
is just about authorization.  One possibility is an authorization
block:

  authorization {  // spelled out to avoid confusion with "authority"
in e.g. a uri
     http-methods { //default: apply to all methods; spelled out to
avoid name collisions
                      ...
                      exempt  FOO BAR;   // these are exempted from the rule
      }
      other-auth-directives...
  }

Thanks,

gregg





More information about the nginx mailing list