From 3b27a5222ad7d7573b31feeff8aa41b97c120636 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Sat, 23 Oct 2021 22:02:48 +0200 Subject: [PATCH] Allow multiple basic auth accounts to be configured --- roles/searx/templates/upstream.json.j2 | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/roles/searx/templates/upstream.json.j2 b/roles/searx/templates/upstream.json.j2 index 12fd8f0..8b90a71 100644 --- a/roles/searx/templates/upstream.json.j2 +++ b/roles/searx/templates/upstream.json.j2 @@ -32,10 +32,15 @@ "providers": { "http_basic": { "accounts": [ +{% for user in searx_authentication %} { - "username": "{{ searx_authentication.username }}", - "password": "{{ searx_authentication.password }}" + "username": "{{ user.username }}", + "password": "{{ user.password }}" } + {% if not loop.last %} + , + {% endif %} +{% endfor %} ] } }