fix: add a robots.txt endpoint

This commit is contained in:
Julian Lobbes 2022-12-05 00:23:52 +01:00
parent e2a5efdbc4
commit 5d936900be
2 changed files with 9 additions and 0 deletions

2
lumi2/static/robots.txt Normal file
View File

@ -0,0 +1,2 @@
User-agent: *
Disallow: /

View File

@ -92,6 +92,13 @@ def about():
return render_template('usermanager/about.html')
@bp.route('/robots.txt')
def robots():
"""Serves the 'robots.txt' file."""
return send_from_directory(current_app.static_folder, "robots.txt")
@bp.route("/users/view/<string:username>")
@login_required
def user_view(username: str):