http-proxy-var-set #
ngx_http_proxy_var_set_module allows setting the variable to the given value during processing of proxy response.
Source: upstream source
Directives
grpc_var_set #
syntax: grpc_var_set 2 args; · context: http, server, location
Defines a changeable request variable whose value is a compiled complex-value expression, for use with grpc_pass upstreams.
proxy_var_set #
syntax: proxy_var_set $variable value [if=condition]; · default: - · context: http, server, location
Sets the request variable to the given value during processing of proxy response. The value may contain variables from request or response, such as $upstream_http_*. These directives are inherited from the previous configuration level only when there is no directive for the same variable defined at the current level.
Example
server {
listen 127.0.0.1:80;
server_name localhost;
location / {
set $no_cache "";
proxy_var_set $no_cache $upstream_http_custom_header1;
proxy_no_cache $no_cache;
proxy_pass http://example.upstream.com;
}
}