Overriding nginx deny rule for a single location block

You should just use allow all

location = /public/endpoint {
    proxy_pass  http://127.0.0.1:9000;

    # Allow *all* IPs here, so that they don't hit the server "deny" rule
    allow all;
}

Also if you use different kind of restrictions, you might need to add satisfy any; for it to work.