14 lines
551 B
Plaintext
14 lines
551 B
Plaintext
|
## hide/remove request headers
|
||
|
{%- set req_hdr_list = j2cfg.uwsgi_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 %}
|
||
|
uwsgi_param {{ h }} "";
|
||
|
{%- endfor %}
|
||
|
|
||
|
## hide response headers
|
||
|
{%- set resp_hdr_list = j2cfg.uwsgi_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 %}
|
||
|
uwsgi_hide_header {{ h }};
|
||
|
{%- endfor %}
|