Maxim Khitrov
August 21, 2016 02:30PM
On Sun, Aug 21, 2016 at 1:43 PM, Maxim Khitrov <max@mxcrypt.com> wrote:
> Hi,
>
> I'm running nginx v1.9.10 on OpenBSD with the following server definition:
>
> server {
> listen 80;
> server_name example.com;
> location / {
> deny all;
> limit_except POST {
> allow all;
> proxy_pass http://10.1.2.3;
> }
> proxy_set_header Host $host;
> }
> }
>
> To my surprise, all GET requests are allowed and are passed to the
> backend server. Is this a bug or am I doing something stupid? In the
> final configuration I want to only allow GET requests, but I'm
> limiting to POST for now to simplify testing.
>
> -Max

I got it working by swapping 'allow' and 'deny' directives and moving
proxy_pass out of limit_except. I was just confused by the
documentation for limit_except. Sorry for the noise.

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

limit_except ignored

Maxim Khitrov August 21, 2016 01:46PM

Re: limit_except ignored

Maxim Khitrov August 21, 2016 02:30PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 201
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