GnoseedGnoseed
DevOps · Flashcard

How does adding a URI part to proxy_pass (e.g. proxy_pass http://back/app/) affect the forwarded path?

Why this is the answer

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.

Read more in the docs
Study in Gnoseed →