summaryrefslogtreecommitdiffstats
path: root/routers/user/home.go
diff options
context:
space:
mode:
authorMartin van Beurden <chadoe@gmail.com>2014-09-14 19:35:22 +0200
committerMartin van Beurden <chadoe@gmail.com>2014-09-18 20:50:48 +0200
commit0055cbd3651ebde0f8b6cc70c9c44de56dc38830 (patch)
tree64a9ea617ba1f704139881c3960fa2425dad9018 /routers/user/home.go
parent4f74b4e6578be4251af65cd08daa37c884e431a0 (diff)
downloadgitea-0055cbd3651ebde0f8b6cc70c9c44de56dc38830.tar.gz
gitea-0055cbd3651ebde0f8b6cc70c9c44de56dc38830.zip
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
Diffstat (limited to 'routers/user/home.go')
-rw-r--r--routers/user/home.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/routers/user/home.go b/routers/user/home.go
index 372f111aec..b411b8fc1f 100644
--- a/routers/user/home.go
+++ b/routers/user/home.go
@@ -13,6 +13,7 @@ import (
"github.com/gogits/gogs/modules/base"
"github.com/gogits/gogs/modules/log"
"github.com/gogits/gogs/modules/middleware"
+ "github.com/gogits/gogs/modules/setting"
)
const (
@@ -126,7 +127,7 @@ func Profile(ctx *middleware.Context) {
uname := ctx.Params(":username")
// Special handle for FireFox requests favicon.ico.
if uname == "favicon.ico" {
- ctx.Redirect("/img/favicon.png")
+ ctx.Redirect(setting.AppRootSubUrl + "/img/favicon.png")
return
}
@@ -141,7 +142,7 @@ func Profile(ctx *middleware.Context) {
}
if u.IsOrganization() {
- ctx.Redirect("/org/" + u.Name)
+ ctx.Redirect(setting.AppRootSubUrl + "/org/" + u.Name)
return
}
@@ -181,7 +182,7 @@ func Email2User(ctx *middleware.Context) {
}
return
}
- ctx.Redirect("/user/" + u.Name)
+ ctx.Redirect(setting.AppRootSubUrl + "/user/" + u.Name)
}
const (