2022-08-27 14:03:10 +02:00
|
|
|
# SSL passthrough matrix
|
|
|
|
|
|
|
|
stream {
|
|
|
|
map $ssl_preread_server_name $name {
|
|
|
|
{% for i in ingress %}
|
|
|
|
{% if 'hosts' in i %}
|
|
|
|
{% for host in i.hosts %}
|
2022-09-06 16:48:28 +02:00
|
|
|
{{ host.name }} {{ i.server }};
|
2022-08-27 14:03:10 +02:00
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
|
|
|
}
|
|
|
|
|
|
|
|
{% for i in ingress %}
|
|
|
|
upstream {{ i.server }} {
|
|
|
|
server {{ i.server }}.n39.eu:443;
|
|
|
|
}
|
|
|
|
{% endfor %}
|
|
|
|
|
|
|
|
server {
|
|
|
|
listen 443;
|
|
|
|
proxy_pass $name;
|
|
|
|
ssl_preread on;
|
|
|
|
}
|
|
|
|
}
|