What happens with proxy_redirect set to off in location with proxy_pass?

Thumbnail image: Go all-in with one consistent WiFi price for 5 years.

From Nginx proxy_redirect

The off parameter cancels the effect of the proxy_redirect directives inherited from the previous configuration level.

So:

Http{
  proxy_redirect example1;
  Server{
    proxy_redirect example2;
    Location{
      proxy_redirect off;
    }
  }
}

Stuff in the http block has example1 applied, stuff in the server block has example1 and example2 applied, and stuff in the location block only has proxy_redirect default; applied.

Alright, but since "proxy_redirect default" cannot be used with "proxy_pass" directive with variables, then what happens when we use variables in proxy pass and set "proxy_redirect off" (edit: when there is no proxy_redirect in parent block)?

More replies More replies