diff options
author | Alexandre Flament <alex@al-f.net> | 2022-06-18 07:26:40 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-18 07:26:40 +0200 |
commit | a7b0b2ecbf82f823750f641500085f316cb4edd0 (patch) | |
tree | a751383a9c47788e42064b272fc6a45e23f32601 /searx | |
parent | 8177bf3f0a4d4f22cf63812dc86a80535cd15d68 (diff) | |
parent | 31005595c9681fbcc75d5d933c3cac1300a22e75 (diff) | |
download | searxng-a7b0b2ecbf82f823750f641500085f316cb4edd0.tar.gz searxng-a7b0b2ecbf82f823750f641500085f316cb4edd0.zip |
Merge pull request #1329 from samsaptidev/feature/privacypolicy_url
Add privacypolicy_url option
Diffstat (limited to 'searx')
-rw-r--r-- | searx/settings.yml | 1 | ||||
-rw-r--r-- | searx/settings_defaults.py | 1 | ||||
-rw-r--r-- | searx/templates/simple/base.html | 9 | ||||
-rwxr-xr-x | searx/webapp.py | 1 |
4 files changed, 10 insertions, 2 deletions
diff --git a/searx/settings.yml b/searx/settings.yml index 709e43627..1a5d85d1a 100644 --- a/searx/settings.yml +++ b/searx/settings.yml @@ -1,6 +1,7 @@ general: debug: false # Debug mode, only for development instance_name: "SearXNG" # displayed name + privacypolicy_url: false # https://example.com/privacy contact_url: false # mailto:contact@example.com enable_metrics: true # record stats diff --git a/searx/settings_defaults.py b/searx/settings_defaults.py index 938b9714d..35089fbd4 100644 --- a/searx/settings_defaults.py +++ b/searx/settings_defaults.py @@ -140,6 +140,7 @@ SCHEMA = { 'general': { 'debug': SettingsValue(bool, False, 'SEARXNG_DEBUG'), 'instance_name': SettingsValue(str, 'SearXNG'), + 'privacypolicy_url': SettingsValue((None, False, str), None), 'contact_url': SettingsValue((None, False, str), None), 'enable_metrics': SettingsValue(bool, True), }, diff --git a/searx/templates/simple/base.html b/searx/templates/simple/base.html index d8eaaa02b..7e5f535d4 100644 --- a/searx/templates/simple/base.html +++ b/searx/templates/simple/base.html @@ -55,8 +55,13 @@ <a href="{{ searx_git_url }}">{{ _('Source code') }}</a> | <a href="{{ get_setting('brand.issue_url') }}">{{ _('Issue tracker') }}</a> | <a href="{{ url_for('stats') }}">{{ _('Engine stats') }}</a> | - <a href="{{ get_setting('brand.public_instances') }}">{{ _('Public instances') }}</a>{% if get_setting('general.contact_url') %} | - <a href="{{ get_setting('general.contact_url') }}">{{ _('Contact instance maintainer') }}</a>{% endif %} + <a href="{{ get_setting('brand.public_instances') }}">{{ _('Public instances') }}</a> + {% if get_setting('general.privacypolicy_url') %} + | <a href="{{ get_setting('general.privacypolicy_url') }}">{{ _('Privacy policy') }}</a> + {% endif %} + {% if get_setting('general.contact_url') %} + | <a href="{{ get_setting('general.contact_url') }}">{{ _('Contact instance maintainer') }}</a> + {% endif %} </p> </footer> <!--[if gte IE 9]>--> diff --git a/searx/webapp.py b/searx/webapp.py index 2ec2f7edd..d4fb1c7dc 100755 --- a/searx/webapp.py +++ b/searx/webapp.py @@ -1355,6 +1355,7 @@ def config(): 'default_theme': settings['ui']['default_theme'], 'version': VERSION_STRING, 'brand': { + 'PRIVACYPOLICY_URL': get_setting('general.privacypolicy_url'), 'CONTACT_URL': get_setting('general.contact_url'), 'GIT_URL': GIT_URL, 'GIT_BRANCH': GIT_BRANCH, |