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

caddy-frontend: Support not resolving backend hostnames

The setup "last,libc,none" allows lazy resolving of backend servers which is
crucial in order to being able to start when the domain does not exists (yet).
parent f249d154
......@@ -50,7 +50,7 @@ md5sum = 37475d79f28c5f126bc1947fdb938fdb
[template-backend-haproxy-configuration]
_update_hash_filename_ = templates/backend-haproxy.cfg.in
md5sum = 5e126be0f74d8ae390a5594e1e912a59
md5sum = d2851c7ebd2c9baa2edecb3ca3485511
[template-empty]
_update_hash_filename_ = templates/empty.in
......
......@@ -13,6 +13,8 @@ defaults
timeout client {{ configuration['request-timeout'] }}s
timeout connect {{ configuration['backend-connect-timeout'] }}s
retries {{ configuration['backend-connect-retries'] }}
{#- Allow to start with not resolved yet servers #}
default-server init-addr last,libc,none
{%- set SCHEME_PREFIX_MAPPING = { 'http': 'http_backend', 'https': 'https_backend'} %}
{%- macro frontend_entry(slave_instance, scheme, wildcard) %}
......
......@@ -1310,6 +1310,9 @@ class TestSlave(SlaveHttpFrontendTestCase, TestDataMixin):
return {
'empty': {
},
'bad-backend': {
'url': 'http://bad.backend/',
},
'Url': {
# make URL "incorrect", with whitespace, nevertheless it shall be
# correctly handled
......
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