Commit f10b9612 authored by Łukasz Nowak's avatar Łukasz Nowak Committed by Rafael Monnerat

caddy-frontend: Fix caddy_custom_https conditions

In those places caddy_custom_https (and it's backward compatbility companion
apache_custom_https) was not checked, thus making it impossible to just use
https customisation, without http one.
parent 95376d5d
...@@ -59,10 +59,6 @@ Generally things to be done with ``caddy-frontend``: ...@@ -59,10 +59,6 @@ Generally things to be done with ``caddy-frontend``:
* drop ``6tunnel`` and use ``bind`` in Caddy configuration, as soon as multiple binds will be possible, tracked in upstream `bind: support multiple values <https://github.com/mholt/caddy/pull/2128>`_ and `ipv6: does not bind on ipv4 and ipv6 for sites that resolve to both <https://github.com/mholt/caddy/issues/864>`_ * drop ``6tunnel`` and use ``bind`` in Caddy configuration, as soon as multiple binds will be possible, tracked in upstream `bind: support multiple values <https://github.com/mholt/caddy/pull/2128>`_ and `ipv6: does not bind on ipv4 and ipv6 for sites that resolve to both <https://github.com/mholt/caddy/issues/864>`_
* use caddy-frontend in `standalone style playbooks <https://lab.nexedi.com/nexedi/slapos.package/tree/master/playbook/roles/standalone-shared>`_ * use caddy-frontend in `standalone style playbooks <https://lab.nexedi.com/nexedi/slapos.package/tree/master/playbook/roles/standalone-shared>`_
* ensure `QUIC <https://en.wikipedia.org/wiki/QUIC>`_ is used by caddy * ensure `QUIC <https://en.wikipedia.org/wiki/QUIC>`_ is used by caddy
* fix missing ``caddy_custom_https`` in:
* instance-apache-replicate.cfg.in:``{% if not ((slave.has_key('caddy_custom_http') or slave.has_key('apache_custom_http')) and not slave.get('slave_reference') in authorized_slave_string) %}``
* templates/apache-custom-slave-list.cfg.in:``{% if caddy_custom_http %}``
Things which can't be implemented: Things which can't be implemented:
......
...@@ -22,11 +22,11 @@ md5sum = a0e1e10f154342e8cc9936066e855b8f ...@@ -22,11 +22,11 @@ md5sum = a0e1e10f154342e8cc9936066e855b8f
[template-apache-replicate] [template-apache-replicate]
filename = instance-apache-replicate.cfg.in filename = instance-apache-replicate.cfg.in
md5sum = 3650a34afe39cdb9fdb46d58fb2acd2e md5sum = 7f15b5745eda8e1f02d4bf7d886dcdad
[template-slave-list] [template-slave-list]
filename = templates/apache-custom-slave-list.cfg.in filename = templates/apache-custom-slave-list.cfg.in
md5sum = ded5050d32d234ab13c843051bfac102 md5sum = fb6c93f42f232e381174a5951c3fc222
[template-slave-configuration] [template-slave-configuration]
filename = templates/custom-virtualhost.conf.in filename = templates/custom-virtualhost.conf.in
...@@ -42,7 +42,7 @@ md5sum = 6689d96fc18d9aad78d77fe87770d4da ...@@ -42,7 +42,7 @@ md5sum = 6689d96fc18d9aad78d77fe87770d4da
[template-custom-slave-list] [template-custom-slave-list]
filename = templates/apache-custom-slave-list.cfg.in filename = templates/apache-custom-slave-list.cfg.in
md5sum = ded5050d32d234ab13c843051bfac102 md5sum = fb6c93f42f232e381174a5951c3fc222
[template-not-found-html] [template-not-found-html]
filename = templates/notfound.html filename = templates/notfound.html
......
...@@ -70,8 +70,8 @@ context = ...@@ -70,8 +70,8 @@ context =
{% set authorized_slave_list = [] %} {% set authorized_slave_list = [] %}
{% set rejected_slave_list = [] %} {% set rejected_slave_list = [] %}
{% for slave in slave_instance_list %} {% for slave in slave_instance_list %}
{# BBB: apache_custom_http #} {# BBB: apache_custom_https AND apache_custom_http #}
{% if not ((slave.has_key('caddy_custom_http') or slave.has_key('apache_custom_http')) and not slave.get('slave_reference') in authorized_slave_string) %} {% if not ((slave.has_key('caddy_custom_http') or slave.has_key('apache_custom_http') or slave.has_key('caddy_custom_https') or slave.has_key('apache_custom_https')) and not slave.get('slave_reference') in authorized_slave_string) %}
{% do authorized_slave_list.append(slave) %} {% do authorized_slave_list.append(slave) %}
{% else %} {% else %}
{% do rejected_slave_list.append(slave.get('slave_reference')) %} {% do rejected_slave_list.append(slave.get('slave_reference')) %}
......
...@@ -213,7 +213,7 @@ rendered = {{ caddy_configuration_directory }}/${:filename} ...@@ -213,7 +213,7 @@ rendered = {{ caddy_configuration_directory }}/${:filename}
{% endif %} {% endif %}
{% if caddy_custom_http %} {% if caddy_custom_http or caddy_custom_https %}
template = {{ template_custom_slave_configuration }} template = {{ template_custom_slave_configuration }}
{% elif slave_type == 'eventsource' %} {% elif slave_type == 'eventsource' %}
template = {{ template_eventsource_slave_configuration }} template = {{ template_eventsource_slave_configuration }}
......
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