Opened 8 years ago

Closed 8 years ago

Last modified 6 years ago

#1016 closed enhancement (invalid)

limit_except accepts multiple methods but docs don't say so

Reported by: Gawin Owned by:
Priority: minor Milestone:
Component: documentation Version: 1.9.x
Keywords: limit_except Cc:
uname -a: Linux octile3 4.2.0-16-generic #19-Ubuntu SMP Thu Oct 8 15:35:06 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
nginx -V: nginx version: openresty/1.9.7.3
built by gcc 5.2.1 20151010 (Ubuntu 5.2.1-22ubuntu2)
built with OpenSSL 1.0.2d 9 Jul 2015
TLS SNI support enabled
configure arguments: --prefix=/usr/local/openresty/nginx --with-cc-opt=-O2 --add-module=../ngx_devel_kit-0.2.19 --add-module=../iconv-nginx-module-0.13 --add-module=../echo-nginx-module-0.58 --add-module=../xss-nginx-module-0.05 --add-module=../ngx_coolkit-0.2rc3 --add-module=../set-misc-nginx-module-0.29 --add-module=../form-input-nginx-module-0.11 --add-module=../encrypted-session-nginx-module-0.04 --add-module=../srcache-nginx-module-0.30 --add-module=../ngx_lua-0.10.0 --add-module=../ngx_lua_upstream-0.04 --add-module=../headers-more-nginx-module-0.29 --add-module=../array-var-nginx-module-0.04 --add-module=../memc-nginx-module-0.16 --add-module=../redis2-nginx-module-0.12 --add-module=../redis-nginx-module-0.3.7 --add-module=../rds-json-nginx-module-0.14 --add-module=../rds-csv-nginx-module-0.07 --with-ld-opt=-Wl,-rpath,/usr/local/openresty/luajit/lib --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-log-path=/var/log/nginx/access.log --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --lock-path=/var/lock/nginx.lock --pid-path=/var/run/nginx.pid --sbin-path=/usr/sbin/nginx --with-http_gzip_static_module --with-http_realip_module --with-http_ssl_module --with-http_sub_module --with-ipv6 --with-pcre-jit --with-md5=/usr/include/openssl --with-sha1=/usr/include/openssl

Description

The documentation of limit_except states it only accepts one method parameter, but it actually accepts multiple (which is a good thing). Would be great if the documentation is updated to reflect the possibility to have multiple method parameters.

Current:

The method parameter can be one of the following:

limit_except GET {
    allow 192.168.1.0/32;
    deny  all;
}

Suggested:

The method parameter can be one or multiple of the following:

limit_except OPTIONS POST {
    allow 192.168.1.0/32;
    deny  all;
}

Change History (2)

comment:1 by Maxim Dounin, 8 years ago

Resolution: invalid
Status: newclosed

The syntax provided in the documentation is as follows:

Syntax:	limit_except method ... { ... }

The method ... string in the syntax (note ...) implies that the method parameter can be repeated multiple times.

comment:2 by aaron.cicali@…, 6 years ago

I agree that the documentation does not communicate this clearly. The syntax may imply that multiple methods are accepted, but that assumes that the reader understands the syntax.

Additionally, the text clearly states that the "method parameter can be one of the following", so seeing or understanding the syntax is no longer necessary once the reader derives the answer from that text.

The text one or more in addition to displaying multiple methods in the example would have been helpful to me.

Note: See TracTickets for help on using tickets.