Commit 47b86782 authored by Łukasz Nowak's avatar Łukasz Nowak

software/rapid-cdn: Switch to http-after-response

This is the only way to be assured that all expected headers are going to be
sent back to the client.
parent 5d5e7bf6
...@@ -38,7 +38,7 @@ md5sum = cba4d995962f7fbeae3f61c9372c4181 ...@@ -38,7 +38,7 @@ md5sum = cba4d995962f7fbeae3f61c9372c4181
[template-frontend-haproxy-configuration] [template-frontend-haproxy-configuration]
_update_hash_filename_ = templates/frontend-haproxy.cfg.in _update_hash_filename_ = templates/frontend-haproxy.cfg.in
md5sum = 84576e8b9923e3acfdd52d69e3bf807a md5sum = 00e5e02eb48363f962d4f8d9934e29c4
[template-frontend-haproxy-crt-list] [template-frontend-haproxy-crt-list]
_update_hash_filename_ = templates/frontend-haproxy-crt-list.in _update_hash_filename_ = templates/frontend-haproxy-crt-list.in
......
...@@ -110,9 +110,9 @@ backend {{ slave_instance['slave_reference'] }}-{{ scheme }} ...@@ -110,9 +110,9 @@ backend {{ slave_instance['slave_reference'] }}-{{ scheme }}
{%- else %} {%- else %}
server {{ slave_instance['slave_reference'] }}-backend-{{ scheme }} {{ info_dict['hostname'] }}:{{ info_dict['port'] }} server {{ slave_instance['slave_reference'] }}-backend-{{ scheme }} {{ info_dict['hostname'] }}:{{ info_dict['port'] }}
{%- if slave_instance['disable-via-header'] %} {%- if slave_instance['disable-via-header'] %}
http-response del-header Via http-after-response del-header Via
{%- else %} {%- else %}
http-response add-header Via "%HV rapid-cdn-frontend-{{ configuration['node-id'] }}-{{ configuration['version-hash'] }}" http-after-response add-header Via "%HV rapid-cdn-frontend-{{ configuration['node-id'] }}-{{ configuration['version-hash'] }}"
{%- endif %} {%- endif %}
{%- if scheme == 'https' %} {%- if scheme == 'https' %}
{%- if slave_instance['strict-transport-security'] > 0 %} {%- if slave_instance['strict-transport-security'] > 0 %}
...@@ -123,7 +123,7 @@ backend {{ slave_instance['slave_reference'] }}-{{ scheme }} ...@@ -123,7 +123,7 @@ backend {{ slave_instance['slave_reference'] }}-{{ scheme }}
{%- if slave_instance['strict-transport-security-preload'] %} {%- if slave_instance['strict-transport-security-preload'] %}
{%- do strict_transport_security.append('; preload') %} {%- do strict_transport_security.append('; preload') %}
{%- endif %} {%- endif %}
http-response set-header Strict-Transport-Security "{{ ''.join(strict_transport_security) }}" http-after-response set-header Strict-Transport-Security "{{ ''.join(strict_transport_security) }}"
{%- endif %} {%- endif %}
{%- endif %} {%- endif %}
{%- for disabled_cookie in slave_instance['disabled-cookie-list'] %} {%- for disabled_cookie in slave_instance['disabled-cookie-list'] %}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment