diff --git a/conf/app.ini b/conf/app.ini index d988b4ac..a3c749be 100644 --- a/conf/app.ini +++ b/conf/app.ini @@ -33,8 +33,6 @@ PATH = data/gogs.db [security] INSTALL_LOCK = false -; Use HTTPS to clone repository, otherwise use HTTP. -ENABLE_HTTPS_CLONE = false ; !!CHANGE THIS TO KEEP YOUR USER DATA SAFE!! SECRET_KEY = !#@FDEWREWR&*( ; Auto-login remember days diff --git a/gogs.go b/gogs.go index f2f408cc..f4b7c72f 100644 --- a/gogs.go +++ b/gogs.go @@ -19,7 +19,7 @@ import ( // Test that go1.2 tag above is included in builds. main.go refers to this definition. const go12tag = true -const APP_VER = "0.1.9.0327 Alpha" +const APP_VER = "0.1.9.0328 Alpha" func init() { base.AppVer = APP_VER diff --git a/modules/base/conf.go b/modules/base/conf.go index f905c381..b3a987e6 100644 --- a/modules/base/conf.go +++ b/modules/base/conf.go @@ -40,8 +40,6 @@ var ( InstallLock bool - EnableHttpsClone bool - LogInRememberDays int CookieUserName string CookieRememberName string @@ -286,8 +284,6 @@ func NewConfigContext() { InstallLock = Cfg.MustBool("security", "INSTALL_LOCK", false) - EnableHttpsClone = Cfg.MustBool("security", "ENABLE_HTTPS_CLONE", false) - LogInRememberDays = Cfg.MustInt("security", "LOGIN_REMEMBER_DAYS") CookieUserName = Cfg.MustValue("security", "COOKIE_USERNAME") CookieRememberName = Cfg.MustValue("security", "COOKIE_REMEMBER_NAME") diff --git a/modules/middleware/repo.go b/modules/middleware/repo.go index cb4a8632..54b735af 100644 --- a/modules/middleware/repo.go +++ b/modules/middleware/repo.go @@ -71,12 +71,8 @@ func RepoAssignment(redirect bool) martini.Handler { ctx.Repo.IsWatching = models.IsWatching(ctx.User.Id, repo.Id) } ctx.Repo.Repository = repo - scheme := "http" - if base.EnableHttpsClone { - scheme = "https" - } ctx.Repo.CloneLink.SSH = fmt.Sprintf("%s@%s:%s/%s.git", base.RunUser, base.Domain, user.LowerName, repo.LowerName) - ctx.Repo.CloneLink.HTTPS = fmt.Sprintf("%s://%s/%s/%s.git", scheme, base.Domain, user.LowerName, repo.LowerName) + ctx.Repo.CloneLink.HTTPS = fmt.Sprintf("%s%s/%s.git", base.AppUrl, user.LowerName, repo.LowerName) if len(params["branchname"]) == 0 { params["branchname"] = "master" diff --git a/routers/admin/admin.go b/routers/admin/admin.go index 0b5e3d8e..f303439f 100644 --- a/routers/admin/admin.go +++ b/routers/admin/admin.go @@ -141,7 +141,6 @@ func Config(ctx *middleware.Context) { ctx.Data["Domain"] = base.Domain ctx.Data["RunUser"] = base.RunUser ctx.Data["RunMode"] = strings.Title(martini.Env) - ctx.Data["EnableHttpsClone"] = base.EnableHttpsClone ctx.Data["RepoRootPath"] = base.RepoRootPath ctx.Data["Service"] = base.Service diff --git a/templates/admin/config.tmpl b/templates/admin/config.tmpl index 39895aa3..ab805d8d 100644 --- a/templates/admin/config.tmpl +++ b/templates/admin/config.tmpl @@ -17,7 +17,6 @@