mirror of
https://codeberg.org/davrot/forgejo.git
synced 2025-05-16 11:00:02 +02:00
SSL enable config option
This commit is contained in:
parent
97e82a0ff6
commit
97debac185
12 changed files with 22 additions and 9 deletions
|
@ -69,8 +69,12 @@ 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("git@%s:%s/%s.git", base.Domain, user.LowerName, repo.LowerName)
|
||||
ctx.Repo.CloneLink.HTTPS = fmt.Sprintf("https://%s/%s/%s.git", 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.Data["IsRepositoryValid"] = true
|
||||
ctx.Data["Repository"] = repo
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue