treewide: improve template expansion
also: support *.toml as extra configuration dictionaries
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
## sourced by conf/proxy-http/headers.conf
|
||||
## set/remove request headers
|
||||
{%- set req_hdr_dict = j2cfg.request_headers or {} -%}
|
||||
{%- for h, v in req_hdr_dict|dictsort %}
|
||||
proxy_set_header {{ h | ngx_esc }} {{ v | ngx_esc }};
|
||||
{%- for h, v in j2cfg.request_headers | http_header | dictsort %}
|
||||
proxy_set_header {{ h }} {{ v | ngx_esc }};
|
||||
{%- endfor %}
|
Reference in New Issue
Block a user