Add noindex to report page when given a URL

This commit is contained in:
rubenwardy 2022-07-19 23:29:56 +01:00
parent 20411e6f81
commit bc4e83d76a
2 changed files with 7 additions and 1 deletions

@ -64,4 +64,4 @@ def report():
return redirect(url_for("tasks.check", id=task.id, r=url_for("homepage.home")))
return render_template("report/index.html", form=form, url=url, is_anon=is_anon)
return render_template("report/index.html", form=form, url=url, is_anon=is_anon, noindex=url is not None)

@ -4,6 +4,12 @@
{{ _("Report") }}
{% endblock %}
{% block headextra %}
{% if noindex %}
<meta name="robots" content="noindex">
{% endif %}
{% endblock %}
{% block content %}
<h1>{{ _("Report") }}</h1>