I have the following in nginx:
# backend
location /backend/ {
deny all;
}
rewrite ^/aaaa/([0-9]+)-([0-9]+)-([0-9]+)\.jpg$ /backend/u/$1/$2/$3.jpg last;
rewrite ^/bbbb/([0-9]+)-([0-9]+)\.json$ /backend/u/$1/$2/report.json last;
but unfortunatelly I get 403 for the 2 rewrites.
Here is the question, how can I serve these files from /backend/* through the rewrites but block anything else?
Try this patch: