From 7ba8f78dd85b454586a54601c6ba2711b424552b Mon Sep 17 00:00:00 2001 From: berkio_admin_gitea Date: Wed, 8 Jul 2026 07:21:03 +0000 Subject: [PATCH] =?UTF-8?q?robots.txt=20=D0=B8=20sitemap.xml:=20=D0=BF?= =?UTF-8?q?=D0=BE=D0=B4=D0=B4=D0=B5=D1=80=D0=B6=D0=BA=D0=B0=20HEAD=20(?= =?UTF-8?q?=D0=B1=D1=8B=D0=BB=D0=B8=20405=20=D0=BD=D0=B0=20HEAD-=D0=BF?= =?UTF-8?q?=D1=80=D0=BE=D0=B2=D0=B5=D1=80=D0=BA=D0=B0=D1=85=20=D0=B2=D0=B0?= =?UTF-8?q?=D0=BB=D0=B8=D0=B4=D0=B0=D1=82=D0=BE=D1=80=D0=BE=D0=B2)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.8 --- app/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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)