From ded28f6b305d3c5b0e70a1b49a21952855b71a43 Mon Sep 17 00:00:00 2001 From: Jimmy Zelinskie Date: Thu, 30 Apr 2015 13:03:50 -0400 Subject: [PATCH] redirect ac-discovery=1 to the index This is a temp fix because rkt doesn't follow redirects. --- endpoints/web.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/endpoints/web.py b/endpoints/web.py index 13f8cbc55..8711cbe9c 100644 --- a/endpoints/web.py +++ b/endpoints/web.py @@ -527,6 +527,9 @@ def redirect_to_repository(namespace, reponame, tag): permission = ReadRepositoryPermission(namespace, reponame) is_public = model.repository_is_public(namespace, reponame) + if request.args.get('ac-discovery', 0) == 1: + return index('') + if permission.can() or is_public: repository_name = '/'.join([namespace, reponame]) return redirect(url_for('web.repository', path=repository_name, tag=tag))