Is it possible to cheat location in nginx? Or rather, canonize whether nginx URI (and always)?
Let's say I want to restrict by IP the access to the directory files/private:
location ~ ^/files/private/.*$ {
if ($remote_addr != '127.0.0.1') {return 403;}
...
}
Understand that in this case it was possible to do without regular expressions. This is just an example.
The user can query as
example.org/files/private/my.zipand
http://example.org/files/./private/my.zip (common browsers automatically convert the second link). What does my location in the second case? If it works, it is always nginx canonicalize the URI before you run it by configuration? Somewhere in the documentation this is stated clearly?