|
@@ -165,7 +165,11 @@ def opensearch():
|
165
|
165
|
method = 'get'
|
166
|
166
|
if request.is_secure:
|
167
|
167
|
scheme = 'https'
|
168
|
|
- ret = opensearch_xml.format(method=method, host=url_for('index', _external=True, _scheme=scheme))
|
|
168
|
+ if settings.hostname:
|
|
169
|
+ hostname = '{0}://{1}/'.format(scheme,settings.hostname)
|
|
170
|
+ else:
|
|
171
|
+ hostname = url_for('index', _external=True, _scheme=scheme)
|
|
172
|
+ ret = opensearch_xml.format(method=method, host=hostname)
|
169
|
173
|
resp = Response(response=ret,
|
170
|
174
|
status=200,
|
171
|
175
|
mimetype="application/xml")
|