openresty / headers-more-nginx-module

Set, add, and clear arbitrary output headers in NGINX http servers
1.65k stars 221 forks source link

Cannot send `$upstream_addr` in a header? #119

Open michalrus opened 3 years ago

michalrus commented 3 years ago

In a location block, I’m trying to do:

location / {
  proxy_pass http://falcon-backend-driving-fr/query;

  more_set_headers 'X-Upstream-Content-Type: $upstream_http_content_type';
  more_set_headers 'X-Upstream-Addr: $upstream_addr';
}

The first line with X-Upstream-Content-Type works, while X-Upstream-Addr is not added at all. I’m not sure, how to proceed…