diff --git a/couchpotato/__init__.py b/couchpotato/__init__.py index daa93bc..9df1612 100644 --- a/couchpotato/__init__.py +++ b/couchpotato/__init__.py @@ -40,6 +40,8 @@ class WebHandler(BaseHandler): return try: + if route == 'robots.txt': + self.set_header('Content-Type', 'text/plain') self.write(views[route]()) except: log.error("Failed doing web request '%s': %s", (route, traceback.format_exc())) @@ -60,6 +62,13 @@ def index(): addView('', index) +# Web view +def robots(): + return 'User-agent: * \n' \ + 'Disallow: /' +addView('robots.txt', robots) + + # API docs def apiDocs(): routes = list(api.keys()) diff --git a/couchpotato/templates/login.html b/couchpotato/templates/login.html index e33db2d..c30ab6b 100644 --- a/couchpotato/templates/login.html +++ b/couchpotato/templates/login.html @@ -6,6 +6,7 @@ + {% for url in fireEvent('clientscript.get_styles', as_html = True, location = 'front', single = True) %} {% end %}