diff options
author | asciimoo <asciimoo@gmail.com> | 2013-12-31 02:09:24 +0100 |
---|---|---|
committer | asciimoo <asciimoo@gmail.com> | 2013-12-31 02:09:24 +0100 |
commit | 32512856b47f1cf13f141bedc116e61511814934 (patch) | |
tree | ebf204c514aa60a80237b5bc14717b24b25d32d3 /searx | |
parent | ff0bbd3566ea126b0cd0cb8b9c60d30c8105e765 (diff) | |
download | searxng-32512856b47f1cf13f141bedc116e61511814934.tar.gz searxng-32512856b47f1cf13f141bedc116e61511814934.zip |
[mod][fix] using base_url instead of hostname in settings.py
Diffstat (limited to 'searx')
-rw-r--r-- | searx/settings.py | 2 | ||||
-rw-r--r-- | searx/webapp.py | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/searx/settings.py b/searx/settings.py index 9efdc20e3..70b7a4514 100644 --- a/searx/settings.py +++ b/searx/settings.py @@ -13,4 +13,4 @@ blacklist = [] # search engine blacklist categories = {} # custom search engine categories -hostname = None # domain name or None - if you want to rewrite the default HTTP host +base_url = None # "https://your.domain.tld/" or None (to use request parameters) diff --git a/searx/webapp.py b/searx/webapp.py index 6ac0046f1..c95cae2c2 100644 --- a/searx/webapp.py +++ b/searx/webapp.py @@ -165,8 +165,8 @@ def opensearch(): method = 'get' if request.is_secure: scheme = 'https' - if settings.hostname: - hostname = '{0}://{1}/'.format(scheme,settings.hostname) + if settings.base_url: + hostname = settings.base_url else: hostname = url_for('index', _external=True, _scheme=scheme) ret = opensearch_xml.format(method=method, host=hostname) |