1
0
Fork 0

cleanup haproxy config

This commit is contained in:
Massaki Archambault 2023-06-09 01:21:05 -04:00
parent df5b8df96c
commit 992c60bf25
2 changed files with 4 additions and 8 deletions

View File

@ -35,6 +35,7 @@ haproxy:
- hass.badjware.dev
- longhorn.badjware.dev
- traefik.badjware.dev
- prometheus.badjware.dev
backend:
- server: 192.168.20.20
- server: 192.168.20.21

View File

@ -62,14 +62,9 @@ frontend https_in
# set X-Forwarded-Proto
http-request set-header X-Forwarded-Proto https
# request is ssl
# tcp-request inspect-delay 5s
# tcp-request content accept if { req.ssl_hello_type 1 }
default_backend default_backend
{% for http_route in https_routing %}
#use_backend https_{{ http_route.frontend[0]|replace('.','_') }} if { req.ssl_sni -i {% for src in http_route.frontend %}{{ src }} {% endfor %}}
use_backend https_{{ http_route.frontend[0]|replace('.','_') }} if { hdr_end(host) -i {% for src in http_route.frontend %}{{ src }} {% endfor %}}{% if 'allowlist' in http_route %} { src {% for ip in http_route.allowlist %}{{ ip }} {% endfor %}}{% endif %}
{% endfor %}
@ -99,12 +94,12 @@ backend https_{{ http_route.frontend[0]|replace('.','_') }}
balance roundrobin
{% for dst in http_route.backend %}
server {{ dst.server }} {{ dst.server }}{% if ':' not in dst.server %}:443{% endif %} check {% if http_route.ssl|default(true) %}ssl verify none alpn h2,http/1.1{% endif %} {{ dst.extra_param|default('') }}
{% endfor %}
{% endfor %}
## TCP ##
{% for tcp_route in tcp_routing %}
frontend tcp_{{ tcp_route.frontend }}
bind *:{{ tcp_route.frontend }}