[mod] enable image proxy for public instances

This commit is contained in:
vojkovic
2026-05-23 13:06:52 +00:00
committed by Brock Vojkovic
parent 01159b82fe
commit e1d25c5078
2 changed files with 8 additions and 1 deletions
+1
View File
@@ -47,6 +47,7 @@
activated:
- :py:obj:`searx.botdetection.link_token` in the :ref:`limiter`
- :ref:`image_proxy`
.. _image_proxy:
+7 -1
View File
@@ -44,6 +44,12 @@ def init_settings():
cfg = cfg or {}
apply_schema(cfg, SCHEMA, [])
if cfg['server']['public_instance']:
cfg['server']['image_proxy'] = True
lock = cfg.setdefault('preferences', {}).setdefault('lock', [])
if 'image_proxy' not in lock:
lock.append('image_proxy')
settings.clear()
settings.update(cfg)
@@ -66,7 +72,7 @@ def init_settings():
if settings['server']['public_instance']:
logger.warning(
"Be aware you have activated features intended only for public instances. "
"This force the usage of the limiter and link_token / "
"This force the usage of the limiter, link_token and image proxy / "
"see https://docs.searxng.org/admin/searx.limiter.html"
)