aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2022-04-25 14:02:29 +0200
committerCédric Bonhomme <cedric@cedricbonhomme.org>2022-04-25 14:02:29 +0200
commit51a4e7b1f0fb1267d4d84e5239ed068e40efda00 (patch)
tree28f0e2fbcd9d81b12b74363b4fd01f9cf93260ee
parentupdated moment.js (diff)
downloadnewspipe-51a4e7b1f0fb1267d4d84e5239ed068e40efda00.tar.gz
newspipe-51a4e7b1f0fb1267d4d84e5239ed068e40efda00.tar.bz2
newspipe-51a4e7b1f0fb1267d4d84e5239ed068e40efda00.zip
added robots dot txt page.
-rw-r--r--newspipe/templates/robots.txt2
-rw-r--r--newspipe/web/views/views.py6
2 files changed, 8 insertions, 0 deletions
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"}
bgstack15