Hi Maxim,
Thanks for you comment! Do you have any other approaches/suggestions?
I use nginx as a proxy/load-balancer. The request will be processed by the
upstream java servers. I assume my change won't actually modify the actual
header, so upstream will still get the original header and can disti
Hello!
On Sat, Aug 15, 2015 at 12:15:47AM -0700, Frank Liu wrote:
> I made the below patch and can now use $upstream_http_x_header for
> logformat to capture the header X.header in the access log. Does anybody
> see any issues with the patch?
>
> --- src/http/ngx_http_variables.c.orig 2015-08-15
I made the below patch and can now use $upstream_http_x_header for
logformat to capture the header X.header in the access log. Does anybody
see any issues with the patch?
--- src/http/ngx_http_variables.c.orig 2015-08-15 02:19:31.635328112 +
+++ src/http/ngx_http_variables.c 2015-08-15 02:19:
Thanks ryd994 for the suggestion! 1 and 2 are working now.
Anyone else has any ideas on 3?
Frank
On Fri, Aug 14, 2015 at 10:36 AM, ryd994 wrote:
> Hi,
>
> 1) Use mapped variable
>
> map $http_ $ {
> "" "value if nit set";
> default $http_;
> }
> Then you can set header with the n
Hi,
1) Use mapped variable
map $http_ $ {
"" "value if nit set";
default $http_;
}
Then you can set header with the new variable.
2) I guess you can use map, too. Use $upstream_http_*name* instead.
3) Sorry, I have no idea on this.
On Sat, Aug 15, 2015, 00:51 Frank Liu wrote:
>
Hi,
I have a few questions regarding headers in nginx:
1) I use proxy_set_header to pass a header to upstream servers. Is it
possible to honor the header if the incoming request already has it?
2) I want to pass the "Server" header from upstream response to clients,
and if there is no such respo