From 4962659acb59a3551c8c2e8b4b14582651a40fff Mon Sep 17 00:00:00 2001 From: Ben Busby Date: Mon, 26 Jun 2023 16:16:45 -0600 Subject: [PATCH] Serve basic robots.txt to avoid indexing Closes #1015 --- app/routes.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app/routes.py b/app/routes.py index 05abfe8..259e53a 100644 --- a/app/routes.py +++ b/app/routes.py @@ -557,6 +557,15 @@ def window(): ) +@app.route(f'/robots.txt') +def robots(): + response = make_response( +'''User-Agent: * +Disallow: /''', 200) + response.mimetype = 'text/plain' + return response + + @app.errorhandler(404) def page_not_found(e): return render_template('error.html', error_message=str(e)), 404