split request/response headers configuration
This commit is contained in:
parent
9b99cb39fb
commit
99696ed5d9
1
angie/autoconf.dist/http-response-headers.conf
Normal file
1
angie/autoconf.dist/http-response-headers.conf
Normal file
@ -0,0 +1 @@
|
||||
include snip.d/http-response-headers;
|
2
angie/conf.dist/fastcgi/headers.conf
Normal file
2
angie/conf.dist/fastcgi/headers.conf
Normal file
@ -0,0 +1,2 @@
|
||||
include snip.d/fastcgi-request-headers;
|
||||
include snip.d/fastcgi-response-headers;
|
2
angie/conf.dist/grpc/headers.conf
Normal file
2
angie/conf.dist/grpc/headers.conf
Normal file
@ -0,0 +1,2 @@
|
||||
include snip.d/grpc-request-headers;
|
||||
include snip.d/grpc-response-headers;
|
2
angie/conf.dist/proxy-http/headers.conf
Normal file
2
angie/conf.dist/proxy-http/headers.conf
Normal file
@ -0,0 +1,2 @@
|
||||
include snip.d/proxy-request-headers;
|
||||
include snip.d/proxy-response-headers;
|
2
angie/conf.dist/scgi/headers.conf
Normal file
2
angie/conf.dist/scgi/headers.conf
Normal file
@ -0,0 +1,2 @@
|
||||
include snip.d/scgi-request-headers;
|
||||
include snip.d/scgi-response-headers;
|
2
angie/conf.dist/uwsgi/headers.conf
Normal file
2
angie/conf.dist/uwsgi/headers.conf
Normal file
@ -0,0 +1,2 @@
|
||||
include snip.d/uwsgi-request-headers;
|
||||
include snip.d/uwsgi-response-headers;
|
@ -1,13 +1,7 @@
|
||||
## sourced by conf.d/fastcgi/headers.conf
|
||||
## hide/remove request headers
|
||||
{%- set req_hdr_dict = j2cfg.request_headers or {} -%}
|
||||
{%- for h, v in req_hdr_dict.items() %}
|
||||
{#- TODO: precise quotation #}
|
||||
fastcgi_param {{ h | as_cgi_header }} {{ v.__repr__() }};
|
||||
{%- endfor %}
|
||||
|
||||
## hide response headers
|
||||
{%- set resp_hdr_dict = j2cfg.response_headers or {} -%}
|
||||
{%- set resp_hdr_list = resp_hdr_dict | dict_keys -%}
|
||||
{%- for h in resp_hdr_list %}
|
||||
fastcgi_hide_header {{ h }};
|
||||
{%- endfor %}
|
7
angie/snip.dist/fastcgi-response-headers.j2
Normal file
7
angie/snip.dist/fastcgi-response-headers.j2
Normal file
@ -0,0 +1,7 @@
|
||||
## sourced by conf.d/fastcgi/headers.conf
|
||||
## hide response headers
|
||||
{%- set resp_hdr_dict = j2cfg.response_headers or {} -%}
|
||||
{%- set resp_hdr_list = resp_hdr_dict | dict_keys -%}
|
||||
{%- for h in resp_hdr_list %}
|
||||
fastcgi_hide_header {{ h }};
|
||||
{%- endfor %}
|
@ -1,13 +1,7 @@
|
||||
## sourced by conf.d/grpc/headers.conf
|
||||
## hide/remove request headers
|
||||
{%- set req_hdr_dict = j2cfg.request_headers or {} -%}
|
||||
{%- for h, v in req_hdr_dict.items() %}
|
||||
{#- TODO: precise quotation #}
|
||||
grpc_set_header {{ h }} {{ v.__repr__() }};
|
||||
{%- endfor %}
|
||||
|
||||
## hide response headers
|
||||
{%- set resp_hdr_dict = j2cfg.response_headers or {} -%}
|
||||
{%- set resp_hdr_list = resp_hdr_dict | dict_keys -%}
|
||||
{%- for h in resp_hdr_list %}
|
||||
grpc_hide_header {{ h }};
|
||||
{%- endfor %}
|
7
angie/snip.dist/grpc-response-headers.j2
Normal file
7
angie/snip.dist/grpc-response-headers.j2
Normal file
@ -0,0 +1,7 @@
|
||||
## sourced by conf.d/grpc/headers.conf
|
||||
## hide response headers
|
||||
{%- set resp_hdr_dict = j2cfg.response_headers or {} -%}
|
||||
{%- set resp_hdr_list = resp_hdr_dict | dict_keys -%}
|
||||
{%- for h in resp_hdr_list %}
|
||||
grpc_hide_header {{ h }};
|
||||
{%- endfor %}
|
@ -1,3 +1,4 @@
|
||||
## sourced by autoconf.d/http-response-headers.conf
|
||||
## add response headers
|
||||
{%- set resp_hdr_dict = j2cfg.response_headers or {} -%}
|
||||
{%- for h, v in resp_hdr_dict.items() %}
|
@ -1,13 +1,7 @@
|
||||
## sourced by conf.d/proxy-http/headers.conf
|
||||
## hide/remove request headers
|
||||
{%- set req_hdr_dict = j2cfg.request_headers or {} -%}
|
||||
{%- for h, v in req_hdr_dict.items() %}
|
||||
{#- TODO: precise quotation #}
|
||||
proxy_set_header {{ h }} {{ v.__repr__() }};
|
||||
{%- endfor %}
|
||||
|
||||
## hide response headers
|
||||
{%- set resp_hdr_dict = j2cfg.response_headers or {} -%}
|
||||
{%- set resp_hdr_list = resp_hdr_dict | dict_keys -%}
|
||||
{%- for h in resp_hdr_list %}
|
||||
proxy_hide_header {{ h }};
|
||||
{%- endfor %}
|
7
angie/snip.dist/proxy-response-headers.j2
Normal file
7
angie/snip.dist/proxy-response-headers.j2
Normal file
@ -0,0 +1,7 @@
|
||||
## sourced by conf.d/proxy-http/headers.conf
|
||||
## hide response headers
|
||||
{%- set resp_hdr_dict = j2cfg.response_headers or {} -%}
|
||||
{%- set resp_hdr_list = resp_hdr_dict | dict_keys -%}
|
||||
{%- for h in resp_hdr_list %}
|
||||
proxy_hide_header {{ h }};
|
||||
{%- endfor %}
|
@ -1,13 +1,7 @@
|
||||
## sourced by conf.d/scgi/headers.conf
|
||||
## hide/remove request headers
|
||||
{%- set req_hdr_dict = 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.response_headers or {} -%}
|
||||
{%- set resp_hdr_list = resp_hdr_dict | dict_keys -%}
|
||||
{%- for h in resp_hdr_list %}
|
||||
scgi_hide_header {{ h }};
|
||||
{%- endfor %}
|
7
angie/snip.dist/scgi-response-headers.j2
Normal file
7
angie/snip.dist/scgi-response-headers.j2
Normal file
@ -0,0 +1,7 @@
|
||||
## sourced by conf.d/scgi/headers.conf
|
||||
## hide response headers
|
||||
{%- set resp_hdr_dict = j2cfg.response_headers or {} -%}
|
||||
{%- set resp_hdr_list = resp_hdr_dict | dict_keys -%}
|
||||
{%- for h in resp_hdr_list %}
|
||||
scgi_hide_header {{ h }};
|
||||
{%- endfor %}
|
@ -1,13 +1,7 @@
|
||||
## sourced by conf.d/uwsgi/headers.conf
|
||||
## hide/remove request headers
|
||||
{%- set req_hdr_dict = j2cfg.request_headers or {} -%}
|
||||
{%- for h, v in req_hdr_dict.items() %}
|
||||
{#- TODO: precise quotation #}
|
||||
uwsgi_param {{ h | as_cgi_header }} {{ v.__repr__() }};
|
||||
{%- endfor %}
|
||||
|
||||
## hide response headers
|
||||
{%- set resp_hdr_dict = j2cfg.response_headers or {} -%}
|
||||
{%- set resp_hdr_list = resp_hdr_dict | dict_keys -%}
|
||||
{%- for h in resp_hdr_list %}
|
||||
uwsgi_hide_header {{ h }};
|
||||
{%- endfor %}
|
7
angie/snip.dist/uwsgi-response-headers.j2
Normal file
7
angie/snip.dist/uwsgi-response-headers.j2
Normal file
@ -0,0 +1,7 @@
|
||||
## sourced by conf.d/uwsgi/headers.conf
|
||||
## hide response headers
|
||||
{%- set resp_hdr_dict = j2cfg.response_headers or {} -%}
|
||||
{%- set resp_hdr_list = resp_hdr_dict | dict_keys -%}
|
||||
{%- for h in resp_hdr_list %}
|
||||
uwsgi_hide_header {{ h }};
|
||||
{%- endfor %}
|
Loading…
Reference in New Issue
Block a user