diff options
-rw-r--r-- | newspipe/templates/robots.txt | 2 | ||||
-rw-r--r-- | newspipe/web/views/views.py | 6 |
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"} |