if, , $request_uri, root, /api/, location server:
if ($request_uri !~ ^/$|^/api/) {return 403;}
, , - , nginx 3 location, - /, /api/, , http://nginx.org/r/location.
, , , $is_args ( $args/$query_string, ), , , URL- / - ( , location $request_uri, $uri, ).
location = / {
if ($request_uri != "/") {
return 403 "<h1>403: query_string not allowed</h1>\n";
}
}
location /api/ {
}
location / {
return 403;
}