14 lines
559 B
Django/Jinja
14 lines
559 B
Django/Jinja
## hide/remove request headers
|
|
{%- set req_hdr_list = j2cfg.fastcgi_remove_request_headers or j2cfg.remove_request_headers or [] -%}
|
|
{%- set req_hdr_list = req_hdr_list | any_to_str_list | as_cgi_header -%}
|
|
{%- for h in req_hdr_list %}
|
|
fastcgi_param {{ h }} "";
|
|
{%- endfor %}
|
|
|
|
## hide response headers
|
|
{%- set resp_hdr_list = j2cfg.fastcgi_remove_response_headers or j2cfg.remove_response_headers or [] -%}
|
|
{%- set resp_hdr_list = resp_hdr_list | any_to_str_list | uniq_str_list -%}
|
|
{%- for h in resp_hdr_list %}
|
|
fastcgi_hide_header {{ h }};
|
|
{%- endfor %}
|