mirror of
https://github.com/go-gitea/gitea
synced 2025-07-05 18:17:19 +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:
@ -14,6 +14,7 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/gogits/gfm"
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
)
|
||||
|
||||
func isletter(c byte) bool {
|
||||
@ -112,7 +113,7 @@ func RenderSpecialLink(rawBytes []byte, urlPrefix string) []byte {
|
||||
ms := MentionPattern.FindAll(line, -1)
|
||||
for _, m := range ms {
|
||||
line = bytes.Replace(line, m,
|
||||
[]byte(fmt.Sprintf(`<a href="/user/%s">%s</a>`, m[1:], m)), -1)
|
||||
[]byte(fmt.Sprintf(`<a href="%s/user/%s">%s</a>`, setting.AppRootSubUrl, m[1:], m)), -1)
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user