13 lines
496 B
Django/Jinja
13 lines
496 B
Django/Jinja
## hide/remove request headers
|
|
{%- set req_hdr_dict = j2cfg.scgi_request_headers or j2cfg.request_headers or {} -%}
|
|
{%- for h, v in req_hdr_dict.items() %}
|
|
{#- TODO: precise quotation #}
|
|
scgi_param {{ h | as_cgi_header }} {{ v.__repr__() }};
|
|
{%- endfor %}
|
|
|
|
## hide response headers
|
|
{%- set resp_hdr_dict = j2cfg.scgi_response_headers or j2cfg.response_headers or {} -%}
|
|
{%- set resp_hdr_list = resp_hdr_dict | dict_keys -%}
|
|
{%- for h in resp_hdr_list %}
|
|
scgi_hide_header {{ h }};
|
|
{%- endfor %} |