summaryrefslogtreecommitdiff
path: root/searx/favicons/favicons.toml
diff options
context:
space:
mode:
authorMarkus Heiser <markus.heiser@darmarit.de>2024-08-19 17:47:54 +0200
committerMarkus Heiser <markus.heiser@darmarIT.de>2024-10-05 08:18:28 +0200
commit7ab577a1fba43578b77f56b76275d0e65d03b318 (patch)
tree0179516d6d89aab77b542494b4e90b22d22cc9cf /searx/favicons/favicons.toml
parentc49a2707c1ba7122c250ba963a83d095441f4d59 (diff)
[mod] Revision of the favicon solution
All favicons implementations have been documented and moved to the Python package: searx.favicons There is a configuration (based on Pydantic) for the favicons and all its components: searx.favicons.config A solution for caching favicons has been implemented: searx.favicon.cache If the favicon is already in the cache, the returned URL is a data URL [1] (something like `data:image/png;base64,...`). By generating a data url from the FaviconCache, additional HTTP roundtripps via the favicon_proxy are saved: favicons.proxy.favicon_url The favicon proxy service now sets a HTTP header "Cache-Control: max-age=...": favicons.proxy.favicon_proxy The resolvers now also provide the mime type (data, mime): searx.favicon.resolvers [1] https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URLs Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'searx/favicons/favicons.toml')
-rw-r--r--searx/favicons/favicons.toml25
1 files changed, 25 insertions, 0 deletions
diff --git a/searx/favicons/favicons.toml b/searx/favicons/favicons.toml
new file mode 100644
index 000000000..0e433d3aa
--- /dev/null
+++ b/searx/favicons/favicons.toml
@@ -0,0 +1,25 @@
+[favicons]
+
+cfg_schema = 1 # config's schema version no.
+
+[favicons.proxy]
+
+# max_age = 5184000 # 60 days / default: 7 days (604800 sec)
+
+# [favicons.proxy.resolver_map]
+#
+# The available favicon resolvers are registered here.
+#
+# "duckduckgo" = "searx.favicons.resolvers.duckduckgo"
+# "allesedv" = "searx.favicons.resolvers.allesedv"
+# "google" = "searx.favicons.resolvers.google"
+# "yandex" = "searx.favicons.resolvers.yandex"
+
+[favicons.cache]
+
+# db_url = "/var/cache/searxng/faviconcache.db" # default: "/tmp/faviconcache.db"
+# HOLD_TIME = 5184000 # 60 days / default: 30 days
+# LIMIT_TOTAL_BYTES = 2147483648 # 2 GB / default: 50 MB
+# BLOB_MAX_BYTES = 40960 # 40 KB / default 20 KB
+# MAINTENANCE_MODE = "off" # default: "auto"
+# MAINTENANCE_PERIOD = 600 # 10min / default: 1h \ No newline at end of file