diff --git a/app/main.py b/app/main.py index c226661..40290b9 100644 --- a/app/main.py +++ b/app/main.py @@ -849,7 +849,7 @@ async def favicon(): return FileResponse("/web_app/static/favicon.ico", media_type="image/x-icon") -@app.get("/robots.txt") +@app.api_route("/robots.txt", methods=["GET", "HEAD"]) async def robots(): return HTMLResponse( content=( @@ -864,7 +864,7 @@ async def robots(): ) -@app.get("/sitemap.xml") +@app.api_route("/sitemap.xml", methods=["GET", "HEAD"]) async def sitemap(): today = datetime.date.today().isoformat() # Все языковые страницы + перекрёстные hreflang-альтернативы (xhtml:link)