1
0
mirror of https://github.com/searxng/searxng.git synced 2024-11-22 20:17:45 +01:00

[fix] strip spaces from searx user agent

h11 (used by httpx) rejects HTTP request with a trailing space in HTTP headers
This commit is contained in:
Alexandre Flament 2021-06-02 17:28:17 +02:00 committed by Markus Heiser
parent 5c5db719d2
commit 92c8a8829f

View File

@ -45,7 +45,7 @@ def searx_useragent():
"""Return the searx User Agent"""
return 'searx/{searx_version} {suffix}'.format(
searx_version=VERSION_STRING,
suffix=settings['outgoing']['useragent_suffix'].strip())
suffix=settings['outgoing']['useragent_suffix']).strip()
def gen_useragent(os=None):