From 51a4e7b1f0fb1267d4d84e5239ed068e40efda00 Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Mon, 25 Apr 2022 14:02:29 +0200 Subject: added robots dot txt page. --- newspipe/templates/robots.txt | 2 ++ newspipe/web/views/views.py | 6 ++++++ 2 files changed, 8 insertions(+) create mode 100644 newspipe/templates/robots.txt diff --git a/newspipe/templates/robots.txt b/newspipe/templates/robots.txt new file mode 100644 index 00000000..1f53798b --- /dev/null +++ b/newspipe/templates/robots.txt @@ -0,0 +1,2 @@ +User-agent: * +Disallow: / diff --git a/newspipe/web/views/views.py b/newspipe/web/views/views.py index 02f4cad8..7ff2a2e4 100644 --- a/newspipe/web/views/views.py +++ b/newspipe/web/views/views.py @@ -119,3 +119,9 @@ def about_more(): talisman.content_security_policy ), ) + + +@current_app.route("/robots.txt", methods=["GET"]) +def robots(): + """Robots dot txt page.""" + return render_template("robots.txt"), 200, {"Content-Type": "text/plain"} -- cgit