From 196b7846cc2e523fff1501b5a58829d652f1a5d9 Mon Sep 17 00:00:00 2001 From: Anthony Woods Date: Mon, 15 Jun 2015 19:02:38 -0400 Subject: [PATCH] add support for robots.txt file --- pkg/cmd/web.go | 1 + public/robots.txt | 2 ++ 2 files changed, 3 insertions(+) create mode 100644 public/robots.txt diff --git a/pkg/cmd/web.go b/pkg/cmd/web.go index 6590c32fc93..c94661a5f9a 100644 --- a/pkg/cmd/web.go +++ b/pkg/cmd/web.go @@ -33,6 +33,7 @@ func newMacaron() *macaron.Macaron { mapStatic(m, "css", "css") mapStatic(m, "img", "img") mapStatic(m, "fonts", "fonts") + mapStatic(m, "robots.txt", "robots.txxt") m.Use(macaron.Renderer(macaron.RenderOptions{ Directory: path.Join(setting.StaticRootPath, "views"), diff --git a/public/robots.txt b/public/robots.txt new file mode 100644 index 00000000000..1f53798bb4f --- /dev/null +++ b/public/robots.txt @@ -0,0 +1,2 @@ +User-agent: * +Disallow: /