openresty / openresty/headers-more-nginx-module

Cannot send `$upstream_addr` in a header?

Open
#119 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
1.8k
Forks
236
Avg merge
1h 34m
Merged PRs (30d)
2

Description

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…

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source file or test is named. Start by reproducing the shown location block with proxy_pass and the two more_set_headers directives, then trace how headers-more handles $upstream_addr versus $upstream_http_content_type. Done means establishing whether the behavior is a bug or an unsupported variable case and adding the appropriate regression coverage or documentation.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, nginx
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.