robots bez autoryzacji
This commit is contained in:
5
app.py
5
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"}
|
||||
|
||||
|
||||
# =========================================================================================
|
||||
|
Reference in New Issue
Block a user