Add basic auth to searx

This commit is contained in:
Marty Oehme 2021-10-23 20:35:56 +02:00
parent 1fae9f9a19
commit 4b440ec9b5
Signed by: Marty
GPG key ID: B7538B8F50A1C800
2 changed files with 19 additions and 0 deletions

View file

@ -8,3 +8,7 @@ searx_use_https: true
# the subdomain link searx will be reachable under # the subdomain link searx will be reachable under
subdomain_alias: search subdomain_alias: search
searx_authentication:
- username: mysearxusername
password: JDJhJDE0JFdjUnQ5WWllcU8wa01xS0JBS2dlMy5zMEhRTmxqTXdIZmdjcTN6ZGFwRjJlYUdoSHAwRUhL # mysearxpassword

View file

@ -26,6 +26,21 @@
], ],
{% endif %} {% endif %}
"handle": [ "handle": [
{% if searx_authentication is not undefined and not none %}
{
"handler": "authentication",
"providers": {
"http_basic": {
"accounts": [
{
"username": "{{ searx_authentication.username }}",
"password": "{{ searx_authentication.password }}"
}
]
}
}
},
{% endif %}
{ {
"handler": "reverse_proxy", "handler": "reverse_proxy",
"upstreams": [ "upstreams": [