mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-31 11:52:10 +00:00
Allow Gogs to run from a suburl behind a reverse proxy. e.g. http://mydomain.com/gogs/
Conflicts: modules/setting/setting.go Conflicts: templates/repo/release/list.tmpl templates/user/dashboard/dashboard.tmpl Conflicts: routers/repo/setting.go
This commit is contained in:
parent
4f74b4e657
commit
0055cbd365
91 changed files with 322 additions and 300 deletions
|
@ -137,7 +137,7 @@ func updateIssuesCommit(userId, repoId int64, repoUserName, repoName string, com
|
|||
return err
|
||||
}
|
||||
|
||||
url := fmt.Sprintf("/%s/%s/commit/%s", repoUserName, repoName, c.Sha1)
|
||||
url := fmt.Sprintf("%s/%s/%s/commit/%s", setting.AppRootSubUrl, repoUserName, repoName, c.Sha1)
|
||||
message := fmt.Sprintf(`<a href="%s">%s</a>`, url, c.Message)
|
||||
|
||||
if _, err = CreateComment(userId, issue.RepoId, issue.Id, 0, 0, COMMIT, message, nil); err != nil {
|
||||
|
|
|
@ -82,14 +82,14 @@ type User struct {
|
|||
// DashboardLink returns the user dashboard page link.
|
||||
func (u *User) DashboardLink() string {
|
||||
if u.IsOrganization() {
|
||||
return "/org/" + u.Name + "/dashboard/"
|
||||
return setting.AppRootSubUrl + "/org/" + u.Name + "/dashboard/"
|
||||
}
|
||||
return "/"
|
||||
return setting.AppRootSubUrl + "/"
|
||||
}
|
||||
|
||||
// HomeLink returns the user home page link.
|
||||
func (u *User) HomeLink() string {
|
||||
return "/user/" + u.Name
|
||||
return setting.AppRootSubUrl + "/user/" + u.Name
|
||||
}
|
||||
|
||||
// AvatarLink returns user gravatar link.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue