Awesome q2a theme

To cheat location in nginx

0 like 0 dislike
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 != '') {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 (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?
by | 41 views

1 Answer

0 like 0 dislike
Try And Use X-Accel-Redirect
110,608 questions
257,187 answers
40,796 users