mirror of
https://github.com/searxng/searxng.git
synced 2024-12-23 09:46:31 +00:00
7ab577a1fb
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>
25 lines
No EOL
906 B
TOML
25 lines
No EOL
906 B
TOML
[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 |