Welcome! Log In Create A New Profile

Advanced

How to upstream request set header based on SSI variable?

Jan Algermissen
December 07, 2016 03:04PM
Hi,

I have setup SSI to include responses from upstream services.

I am trying to find a way to set additional headers for these upstream
requests based on a variable set in the SSI page but I am not sure if
that even works at all.

Does someone know *if* this is doable and if so, how?


In config I have

server {
set $etag "xxxxx";

location /up1/ {
proxy_set_header If-Match $etag;
proxy_pass http://upstream1/up1/;
}
}



<!--# set var="etag" value="123456" -->
<!--# include virtual="/up1/this/is/requested/from/upstream" -->


This sends an

If-Match: xxxxx

header to the upstream, but what I want to achieve is to send the
"123456" instead.

I'd also be glad for suggestions what I might try to get this to work.

Jan
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

How to upstream request set header based on SSI variable?

Jan Algermissen December 07, 2016 03:04PM

Re: How to upstream request set header based on SSI variable?

Maxim Dounin December 08, 2016 08:48AM

Re: How to upstream request set header based on SSI variable?

Jan Algermissen December 08, 2016 09:14AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 200
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready