From 35a1906d3d00e156c624d71010b6fbf7602ca6f1 Mon Sep 17 00:00:00 2001 From: Dylan Date: Sun, 13 Aug 2023 14:25:06 +0100 Subject: [PATCH] Add robots.txt --- twitfix.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/twitfix.py b/twitfix.py index 7506b60..9ba7061 100644 --- a/twitfix.py +++ b/twitfix.py @@ -45,6 +45,10 @@ def isValidUserAgent(user_agent): return True return False +@app.route('/robots.txt') +def robots(): + return "User-agent: *\nDisallow: /" + @app.route('/') # If the useragent is discord, return the embed, if not, redirect to configured repo directly def default(): user_agent = request.headers.get('user-agent')