Add sitemap.xml and robots.txt for SEO optimization
This commit is contained in:
6
app.py
6
app.py
@@ -503,6 +503,12 @@ def api_docs():
|
||||
response = make_response(render_template('swagger.html'))
|
||||
return add_cache_headers(response)
|
||||
|
||||
@app.route('/sitemap.xml')
|
||||
def sitemap():
|
||||
"""Serviert die Sitemap für Suchmaschinen"""
|
||||
from flask import send_file
|
||||
return send_file('sitemap.xml', mimetype='application/xml')
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
app.run(debug=True, host="0.0.0.0")
|
Reference in New Issue
Block a user