Commit b7365246 authored by Łukasz Nowak's avatar Łukasz Nowak

caddy-frontend: Fix backend Via header for https backend

Rarely used https backend was missing the backend Via additions, thus it was
not transmitted there.
parent ad36bcac
Pipeline #22795 failed with stage
in 0 seconds
......@@ -50,7 +50,7 @@ md5sum = 57c86795293b11300a036f5f8cf2c868
[template-backend-haproxy-configuration]
_update_hash_filename_ = templates/backend-haproxy.cfg.in
md5sum = 6d4ad68ac44ccc72fe9148bd8e05a6f0
md5sum = 81c73a4995409acb548621e5fb11d481
[template-empty]
_update_hash_filename_ = templates/empty.in
......
......@@ -69,6 +69,8 @@ frontend http-backend
frontend https-backend
bind {{ configuration['local-ipv4'] }}:{{ configuration['https-port'] }}
http-request add-header Via "%HV rapid-cdn-backend-{{ configuration['node-id'] }}-{{ configuration['version-hash'] }}"
http-response add-header Via "%HV rapid-cdn-backend-{{ configuration['node-id'] }}-{{ configuration['version-hash']}}"
{%- for slave_instance in backend_slave_list -%}
{{ frontend_entry(slave_instance, 'https', False) }}
{%- endfor %}
......
......@@ -4532,6 +4532,9 @@ class TestSlave(SlaveHttpFrontendTestCase, TestDataMixin):
result.headers['Strict-Transport-Security'])
self.assertEqualResultJson(result, 'Path', '/https/test-path/deeper')
self.assertBackendHeaders(
result.json()['Incoming Headers'],
parameter_dict['domain'])
result_http = fakeHTTPResult(
parameter_dict['domain'],
......
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