Serve basic robots.txt to avoid indexing

Closes #1015
main
Ben Busby 2023-06-26 16:16:45 -06:00
parent 8a2a6f3265
commit 4962659acb
No known key found for this signature in database
GPG Key ID: B9B7231E01D924A1
1 changed files with 9 additions and 0 deletions

View File

@ -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) @app.errorhandler(404)
def page_not_found(e): def page_not_found(e):
return render_template('error.html', error_message=str(e)), 404 return render_template('error.html', error_message=str(e)), 404