From 076fdc3f8bf416efd1e1595bb63a3d5a1b686185 Mon Sep 17 00:00:00 2001 From: Alex Harvey Date: Sun, 5 Jun 2016 15:48:59 -0700 Subject: [PATCH] Add a robots.txt (#2207) --- homeassistant/components/frontend/__init__.py | 4 ++++ homeassistant/components/frontend/www_static/robots.txt | 2 ++ 2 files changed, 6 insertions(+) create mode 100644 homeassistant/components/frontend/www_static/robots.txt diff --git a/homeassistant/components/frontend/__init__.py b/homeassistant/components/frontend/__init__.py index 7e8b1f36d32..2773c90ba19 100644 --- a/homeassistant/components/frontend/__init__.py +++ b/homeassistant/components/frontend/__init__.py @@ -25,6 +25,10 @@ def setup(hass, config): os.path.join(www_static_path, sw_path), 0 ) + hass.wsgi.register_static_path( + "/robots.txt", + os.path.join(www_static_path, "robots.txt") + ) hass.wsgi.register_static_path("/static", www_static_path) hass.wsgi.register_static_path("/local", hass.config.path('www')) diff --git a/homeassistant/components/frontend/www_static/robots.txt b/homeassistant/components/frontend/www_static/robots.txt new file mode 100644 index 00000000000..77470cb39f0 --- /dev/null +++ b/homeassistant/components/frontend/www_static/robots.txt @@ -0,0 +1,2 @@ +User-agent: * +Disallow: / \ No newline at end of file