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"} # =========================================================================================