From 37d7a0b123c7d09f6f05a4a11f68db5941146bea Mon Sep 17 00:00:00 2001 From: Ludovic Cartier Date: Tue, 7 May 2024 12:00:42 +0200 Subject: [PATCH] wikijs - update loop for ClientIP --- templates/compose/wikijs.yml.j2 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/templates/compose/wikijs.yml.j2 b/templates/compose/wikijs.yml.j2 index 1c95161..1440599 100644 --- a/templates/compose/wikijs.yml.j2 +++ b/templates/compose/wikijs.yml.j2 @@ -57,7 +57,8 @@ services: labels: traefik.enable: true traefik.docker.network: traefik - traefik.http.routers.wikijs.rule: "Host(`{{ wikijs_domain }}`){% if wikijs_whitelist is defined %} && ClientIP({% for ip in wikijs_whitelist %}`{{ ip }}`,{% endfor %}){% endif %}" + #traefik.http.routers.wikijs.rule: "Host(`{{ wikijs_domain }}`){% if wikijs_whitelist is defined %} && ClientIP({% for ip in wikijs_whitelist %}`{{ ip }}`,{% endfor %}){% endif %}" + traefik.http.routers.wikijs.rule: "Host(`{{ wikijs_domain }}`){% if wikijs_whitelist is defined %} && ({% for ip in wikijs_whitelist %}{% if not loop.last %}ClientIP(`{{ ip }}`) ||{%else}ClientIP(`{{ ip }}`){% endif %}{% endfor %}){% endif %}" traefik.http.routers.wikijs.tls: true traefik.http.routers.wikijs.tls.certresolver: letsencrypt traefik.http.routers.wikijs.entrypoints: "websecure"