aboutsummaryrefslogtreecommitdiff
path: root/modules/setting/setting.go
diff options
context:
space:
mode:
authorThibault Meyer <0xbaadf00d@users.noreply.github.com>2016-12-22 07:42:04 +0100
committer无闻 <u@gogs.io>2016-12-22 01:42:04 -0500
commitc47fbc629bec5b4c213ddff24e96c20ed8f4ca74 (patch)
tree25f404cf44674c090fca73ae46dda9d6dfc5ee1b /modules/setting/setting.go
parentd04b19545db513c31d86d503046f51ba780e4038 (diff)
Feature #2583: Disable HTTP cloning (#3667)
* Can disable GIT interactions by HTTP protocol * rename variable + fix wiki link * missing space
Diffstat (limited to 'modules/setting/setting.go')
-rw-r--r--modules/setting/setting.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/setting/setting.go b/modules/setting/setting.go
index e7202b01..ea76e6c4 100644
--- a/modules/setting/setting.go
+++ b/modules/setting/setting.go
@@ -118,6 +118,7 @@ var (
MirrorQueueLength int
PullRequestQueueLength int
PreferredLicenses []string
+ DisableHTTPGit bool
// Repository editor settings
Editor struct {
@@ -494,6 +495,7 @@ func NewContext() {
// Determine and create root git repository path.
sec = Cfg.Section("repository")
+ Repository.DisableHTTPGit = sec.Key("DISABLE_HTTP_GIT").MustBool()
RepoRootPath = sec.Key("ROOT").MustString(path.Join(homeDir, "gogs-repositories"))
forcePathSeparator(RepoRootPath)
if !filepath.IsAbs(RepoRootPath) {