summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorUnknwon <joe2010xtmf@163.com>2014-09-21 19:39:10 -0400
committerUnknwon <joe2010xtmf@163.com>2014-09-21 19:39:10 -0400
commit1273b3d3a985e0aeb88c632e27d0e8dbc8dd2e19 (patch)
tree14aa87f32a82081f917d137775e3de01522c809e /modules
parentb72d7c201ab34bd4de9582be891c3d4b76c3fd70 (diff)
downloadgitea-1273b3d3a985e0aeb88c632e27d0e8dbc8dd2e19.tar.gz
gitea-1273b3d3a985e0aeb88c632e27d0e8dbc8dd2e19.zip
Support custom robots.txt
Diffstat (limited to 'modules')
-rw-r--r--modules/setting/setting.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/setting/setting.go b/modules/setting/setting.go
index a1ab43d022..67e48108d9 100644
--- a/modules/setting/setting.go
+++ b/modules/setting/setting.go
@@ -108,6 +108,7 @@ var (
ProdMode bool
RunUser string
IsWindows bool
+ HasRobotsTxt bool
)
func init() {
@@ -260,6 +261,8 @@ func NewConfigContext() {
Langs = Cfg.MustValueArray("i18n", "LANGS", ",")
Names = Cfg.MustValueArray("i18n", "NAMES", ",")
+
+ HasRobotsTxt = com.IsFile(path.Join(CustomPath, "robots.txt"))
}
var Service struct {