Merge pull request ' Allow to mark HTTPS sites as "local"' (!76) from https-ingress-filter into master

Reviewed-on: https://gitea.n39.eu/Netz39_Admin/netz39-infra-ansible/pulls/76
Reviewed-by: dkdent <dkdent@netz39.de>
This commit is contained in:
Stefan Haun 2022-09-06 17:40:28 +00:00
commit 8617f84f9d
3 changed files with 21 additions and 15 deletions

View file

@ -11,22 +11,26 @@
ingress: ingress:
- server: kant - server: kant
hosts: hosts:
- jabber.n39.eu - name: jabber.n39.eu
- conference.jabber.n39.eu - name: conference.jabber.n39.eu
- spaceapi.n39.eu - name: spaceapi.n39.eu
- server: krypton - server: krypton
hosts: hosts:
- entities.svc.n39.eu - name: entities.svc.n39.eu
- server: pottwal - server: pottwal
hosts: hosts:
- gitea.n39.eu - name: gitea.n39.eu
- uritools.n39.eu - name: uritools.n39.eu
- entities-validation.svc.n39.eu - name: entities-validation.svc.n39.eu
- sl.n39.eu - name: sl.n39.eu
- pad.n39.eu - name: pad.n39.eu
- brotherql-web.n39.eu - name: brotherql-web.n39.eu
local: true
- server: radon - server: radon
hosts: hosts:
- nodered.n39.eu - name: nodered.n39.eu
- rabbitmq.n39.eu local: true
- pwr-meter-pulse-gw-19i.svc.n39.eu - name: rabbitmq.n39.eu
local: true
- name: pwr-meter-pulse-gw-19i.svc.n39.eu
local: true

View file

@ -4,7 +4,7 @@
server { server {
listen 80; listen 80;
listen [::]:80; listen [::]:80;
server_name {{ host }}; server_name {{ host.name }};
location /.well-known/acme-challenge { location /.well-known/acme-challenge {
proxy_pass http://{{ item.server }}.n39.eu:80; proxy_pass http://{{ item.server }}.n39.eu:80;

View file

@ -5,7 +5,9 @@ stream {
{% for i in ingress %} {% for i in ingress %}
{% if 'hosts' in i %} {% if 'hosts' in i %}
{% for host in i.hosts %} {% for host in i.hosts %}
{{ host }} {{ i.server }}; {% if host.local is not defined or host.local == False %}
{{ host.name }} {{ i.server }};
{% endif%}
{% endfor %} {% endfor %}
{% endif %} {% endif %}
{% endfor %} {% endfor %}