According to the NGINX documentation
proxy_set_header field value
allows redefining or appending fields to the request header passed to the proxied server. The value can contain text, variables, and their combinations.
So I can do
set $my_variable "some_value";
proxy_set_header x-my-header $my_variable;
Is it anyhow possible to use a variable for the field
parameter, i.e. have the header name based on a variable? I want to be able to configure NGINX like
set $my_variable "x-my-header";
proxy_set_header $my_variable "some_value";