To avoid them spamming the log and being served correctly

This commit is contained in:
Dominik V. Salonen 2015-12-27 18:46:21 +01:00
parent ce01f0ac19
commit 3c30e1ac11
1 changed files with 11 additions and 0 deletions

11
run.py
View File

@ -120,6 +120,17 @@ def privacy():
def faq(): def faq():
return render_template('faq.html', page=config["SITE_DATA"]) return render_template('faq.html', page=config["SITE_DATA"])
# Static resources that browsers spam for
@app.route('/favicon.ico')
def favicon():
return send_from_directory('static', 'favicon.ico')
@app.route('/apple-touch-icon.png')
def favicon():
return send_from_directory('static', 'logo/152px.png')
@app.route('/apple-touch-icon.png')
def favicon():
return send_from_directory('static', 'robots.txt')
# Custom 404 # Custom 404
@app.errorhandler(404) @app.errorhandler(404)
def page_not_found(e): def page_not_found(e):