This is an automated email from the ASF dual-hosted git repository. brondsem pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/allura.git
The following commit(s) were added to refs/heads/master by this push: new 90bb0314b [#8429] adding noindex,follow header to auth redirects 90bb0314b is described below commit 90bb0314be2773ad7173539b480bdd0872872a5a Author: Guillermo Cruz <guillermo.c...@slashdotmedia.com> AuthorDate: Wed May 11 11:41:53 2022 -0600 [#8429] adding noindex,follow header to auth redirects --- Allura/allura/lib/custom_middleware.py | 2 +- .../forgediscussion/templates/discussionforums/create_topic.html | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Allura/allura/lib/custom_middleware.py b/Allura/allura/lib/custom_middleware.py index edcc4dbff..ca97111f0 100644 --- a/Allura/allura/lib/custom_middleware.py +++ b/Allura/allura/lib/custom_middleware.py @@ -165,7 +165,7 @@ class LoginRedirectMiddleware: else: # Don't try to re-post; the body has been lost. location = tg.url(login_url) - r = exc.HTTPFound(location=location) + r = exc.HTTPFound(location=location, headers={'X-Robots-Tag': 'noindex,follow'}) return r(environ, start_response) start_response(status, headers, exc_info) return app_iter diff --git a/ForgeDiscussion/forgediscussion/templates/discussionforums/create_topic.html b/ForgeDiscussion/forgediscussion/templates/discussionforums/create_topic.html index 487553caa..85869dd00 100644 --- a/ForgeDiscussion/forgediscussion/templates/discussionforums/create_topic.html +++ b/ForgeDiscussion/forgediscussion/templates/discussionforums/create_topic.html @@ -19,6 +19,9 @@ {% extends g.theme.master %} {% block title %}{{c.project.name}} / {{c.app.config.options.mount_label}} / Create Topic{% endblock %} +{% block head %} + <meta name="robots" content="noindex,follow"> +{% endblock %} {% block header %}Create Topic{% endblock %}