From 9142dc14132f29bfe271b45c64842619947f99e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Gruszczy=C5=84ski?= Date: Sat, 2 Aug 2025 14:30:31 +0200 Subject: [PATCH] robots bez autoryzacji --- app.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app.py b/app.py index a3eb276..ce06b2c 100644 --- a/app.py +++ b/app.py @@ -2895,9 +2895,8 @@ def healthcheck(): @app.route("/robots.txt") def robots_txt(): - if app.config.get("DISABLE_ROBOTS", False): - return "User-agent: *\nDisallow: /", 200, {"Content-Type": "text/plain"} - return "User-agent: *\nAllow: /", 200, {"Content-Type": "text/plain"} + content = "User-agent: *\nDisallow: /" if app.config.get("DISABLE_ROBOTS") else "User-agent: *\nAllow: /" + return content, 200, {"Content-Type": "text/plain"} # =========================================================================================