Merge pull request #21 from alecmerdler/opensearch

OpenSearch
This commit is contained in:
Alec Merdler 2019-11-20 14:14:51 -05:00 committed by GitHub
commit 73bab07baf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 21 additions and 0 deletions

View file

@ -83,6 +83,16 @@ def not_found_error_display(e = None):
resp.status_code = 404
return resp
@web.route('/opensearch.xml')
def opensearch():
template = render_template('opensearch.xml',
baseurl=get_app_url(),
registry_title=app.config.get('REGISTRY_TITLE', 'Quay'))
resp = make_response(template)
resp.headers['Content-Type'] = 'application/xml'
return resp
@web.route('/organization/<path:path>', methods=['GET'])
@web.route('/organization/<path:path>/', methods=['GET'])
@no_cache