mirror of
https://github.com/searxng/searxng.git
synced 2026-07-31 04:11:26 +00:00
Compare commits
5 Commits
cb0a75bad9
...
e86bfa163b
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e86bfa163b | ||
|
|
333d536937 | ||
|
|
1fd4dab3b4 | ||
|
|
887594f634 | ||
|
|
bc5c8e5748 |
@@ -62,8 +62,6 @@ RUN su searxng -c "/usr/bin/python3 -m compileall -q searx" \
|
|||||||
-o -name '*.svg' -o -name '*.ttf' -o -name '*.eot' \) \
|
-o -name '*.svg' -o -name '*.ttf' -o -name '*.eot' \) \
|
||||||
-type f -exec gzip -9 -k {} \+ -exec brotli --best {} \+
|
-type f -exec gzip -9 -k {} \+ -exec brotli --best {} \+
|
||||||
|
|
||||||
HEALTHCHECK CMD wget --quiet --tries=1 --spider http://localhost:8080/healthz || exit 1
|
|
||||||
|
|
||||||
# Keep these arguments at the end to prevent redundant layer rebuilds
|
# Keep these arguments at the end to prevent redundant layer rebuilds
|
||||||
ARG LABEL_DATE=
|
ARG LABEL_DATE=
|
||||||
ARG GIT_URL=unknown
|
ARG GIT_URL=unknown
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ paging = True
|
|||||||
|
|
||||||
def clean_url(url):
|
def clean_url(url):
|
||||||
parsed = urlparse(url)
|
parsed = urlparse(url)
|
||||||
query = [(k, v) for (k, v) in parse_qsl(parsed.query) if k not in ['ixid', 's']]
|
query = [(k, v) for (k, v) in parse_qsl(parsed.query) if k != 'ixid']
|
||||||
|
|
||||||
return urlunparse((parsed.scheme, parsed.netloc, parsed.path, parsed.params, urlencode(query), parsed.fragment))
|
return urlunparse((parsed.scheme, parsed.netloc, parsed.path, parsed.params, urlencode(query), parsed.fragment))
|
||||||
|
|
||||||
@@ -47,7 +47,7 @@ def response(resp):
|
|||||||
'template': 'images.html',
|
'template': 'images.html',
|
||||||
'url': clean_url(result['links']['html']),
|
'url': clean_url(result['links']['html']),
|
||||||
'thumbnail_src': clean_url(result['urls']['thumb']),
|
'thumbnail_src': clean_url(result['urls']['thumb']),
|
||||||
'img_src': clean_url(result['urls']['raw']),
|
'img_src': clean_url(result['urls']['regular']),
|
||||||
'title': result.get('alt_description') or 'unknown',
|
'title': result.get('alt_description') or 'unknown',
|
||||||
'content': result.get('description') or '',
|
'content': result.get('description') or '',
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -641,7 +641,7 @@ class WDURLAttribute(WDAttribute):
|
|||||||
return get_external_url(url_id, value)
|
return get_external_url(url_id, value)
|
||||||
|
|
||||||
if self.url_path_prefix:
|
if self.url_path_prefix:
|
||||||
[account, domain] = value.split('@', 1)
|
[account, domain] = [x.strip("@ ") for x in value.rsplit('@', 1)]
|
||||||
return f"https://{domain}{self.url_path_prefix}{account}"
|
return f"https://{domain}{self.url_path_prefix}{account}"
|
||||||
|
|
||||||
return value
|
return value
|
||||||
|
|||||||
Reference in New Issue
Block a user