Welcome! Log In Create A New Profile

Advanced

limit_access inconsistency/issues

Pavel Kolla
February 09, 2011 07:40AM
I am trying to use limit_access to control availability of some locations via
certain methods (in my scenario there are places where only POST is allowed by
app logic). However this is what i encountered:

location /t/
{
limit_except GET
{
deny all;
}
}

# curl -I -X GET pkolla:88/t/index.html
HTTP/1.1 200 OK
# curl -I -X POST pkolla:88/t/index.html
HTTP/1.1 403 Forbidden



location /t/
{
limit_except POST
{
deny all;
}
}

# curl -I -X GET pkolla:88/t/index.html
HTTP/1.1 403 Forbidden
# curl -I -X POST pkolla:88/t/index.html
HTTP/1.1 405 Not Allowed


IMHO in first case responses should be 200/405 and in second 405/200, even if
access returns 403 rather than 405 (being related to http_access_module ) it
still should be consistent and return 200 for POST in second case instead of
405.

Am i totally missing the concept or there is something else i didn't get?

just in case full config: http://dpaste.com/hold/398339/


_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

limit_access inconsistency/issues

Pavel Kolla February 09, 2011 07:40AM

Re: limit_access inconsistency/issues

Francis Daly February 09, 2011 09:44AM

Re: limit_access inconsistency/issues

Maxim Dounin February 09, 2011 09:48AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 121
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready