With a URI in proxy_pass, nginx replaces the matched location prefix with that URI (location /api/ plus proxy_pass http://back/app/ turns /api/x into /app/x). Without a URI the original request URI is passed unchanged, but it is never simply appended, never ignored, and a URI in proxy_pass is fully allowed.
Official docs