robots bez autoryzacji

This commit is contained in:
Mateusz Gruszczyński
2025-08-02 14:30:31 +02:00
parent a612d4c25c
commit 9142dc1413

5
app.py
View File

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