2024-07-24 22:47:53 +03:00
|
|
|
## hide/remove request headers
|
2024-07-31 14:04:15 +03:00
|
|
|
{%- set req_hdr_dict = j2cfg.grpc_request_headers or j2cfg.request_headers or {} -%}
|
|
|
|
{%- for h, v in req_hdr_dict.items() %}
|
|
|
|
{#- TODO: precise quotation #}
|
|
|
|
grpc_set_header {{ h }} {{ v.__repr__() }};
|
2024-07-24 22:47:53 +03:00
|
|
|
{%- endfor %}
|
|
|
|
|
|
|
|
## hide response headers
|
2024-07-31 14:04:15 +03:00
|
|
|
{%- set resp_hdr_dict = j2cfg.grpc_response_headers or j2cfg.response_headers or {} -%}
|
|
|
|
{%- set resp_hdr_list = resp_hdr_dict | dict_keys -%}
|
2024-07-24 22:47:53 +03:00
|
|
|
{%- for h in resp_hdr_list %}
|
|
|
|
grpc_hide_header {{ h }};
|
2024-07-31 14:04:15 +03:00
|
|
|
{%- endfor %}
|