Serve robots.txt from the admin app

We’re getting rid of the PaaS proxy, which is where this file is
currently served from.

Values copied from 3632313fdf/ansible/roles/nginx/files/robots.txt
This commit is contained in:
Chris Hill-Scott
2018-08-29 15:41:53 +01:00
parent 162fd3773e
commit 09876532ae
3 changed files with 29 additions and 0 deletions

View File

@@ -26,6 +26,17 @@ def index():
return render_template('views/signedout.html')
@main.route('/robots.txt')
def robots():
return (
'User-agent: *\n'
'Disallow: /sign-in\n'
'Disallow: /support\n'
'Disallow: /support/\n'
'Disallow: /register\n'
), 200, {'Content-Type': 'text/plain'}
@main.route('/error/<int:status_code>')
def error(status_code):
if status_code >= 500: