Welcome! Log In Create A New Profile

Advanced

Re: Allow/Deny rules in Location block

All files from this thread

File Name File Size   Posted by Date  
ngxinx.conf 4.9 KB open | download sandeep dubey 01/25/2023 Read message
nanaya
January 25, 2023 12:30AM
Just adding, if it's `location /auth {}`, it'll also match /autha, /authb, /authsomething/something, not just limited to /auth/*.

On Wed, Jan 25, 2023, at 01:56, Reinis Rozitis wrote:
>> There are other locations like /auth, /auth/, /auth/admin, /auth/admin/ and few more which have the same rules. I am trying to restrict access to /auth and /auth/admin which are sensitive for public access. Do you think removing "=" can help in this case?
>
>
> '=' in location definition means that nginx will use it only on exact uri match.
>
> if you have location = /auth {} but client requests /auth/admin (unless
> you have also location = /auth/admin) then that particular location
> configuration won't be used and will match the 'location / {}' which in
> your configuration sample was proxied without any deny rules.
>
> By removing the '=' it means all the /auth, /auth/* requests will be
> processed in that location.
>
> Good to also check the documentation on it
> http://nginx.org/en/docs/http/ngx_http_core_module.html#location
>
> rr
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> https://mailman.nginx.org/mailman/listinfo/nginx
_______________________________________________
nginx mailing list
nginx@nginx.org
https://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Allow/Deny rules in Location block

sandeep dubey January 23, 2023 04:36AM

Re: Allow/Deny rules in Location block

Ian Hobson January 23, 2023 06:58AM

RE: Allow/Deny rules in Location block

Reinis Rozitis January 23, 2023 07:40AM

Re: Allow/Deny rules in Location block

sandeep dubey January 24, 2023 12:42AM

RE: Allow/Deny rules in Location block

Reinis Rozitis January 24, 2023 11:58AM

Re: Allow/Deny rules in Location block

nanaya January 25, 2023 12:30AM

Re: Allow/Deny rules in Location block

sandeep dubey January 25, 2023 12:56AM

Re: Allow/Deny rules in Location block Attachments

sandeep dubey January 25, 2023 12:56AM

RE: Allow/Deny rules in Location block

Reinis Rozitis January 25, 2023 08:30AM

Re: Allow/Deny rules in Location block

sandeep dubey January 27, 2023 09:02AM

Re: Allow/Deny rules in Location block

sandeep dubey January 24, 2023 12:38AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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