diff options
author | Martin van Beurden <chadoe@gmail.com> | 2014-09-14 19:35:22 +0200 |
---|---|---|
committer | Martin van Beurden <chadoe@gmail.com> | 2014-09-18 20:50:48 +0200 |
commit | 0055cbd3651ebde0f8b6cc70c9c44de56dc38830 (patch) | |
tree | 64a9ea617ba1f704139881c3960fa2425dad9018 /routers/admin/auths.go | |
parent | 4f74b4e6578be4251af65cd08daa37c884e431a0 (diff) | |
download | gitea-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/admin/auths.go')
-rw-r--r-- | routers/admin/auths.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/routers/admin/auths.go b/routers/admin/auths.go index 6fbeab354e..9eaae489ae 100644 --- a/routers/admin/auths.go +++ b/routers/admin/auths.go @@ -14,6 +14,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 ( @@ -99,7 +100,7 @@ func NewAuthSourcePost(ctx *middleware.Context, form auth.AuthenticationForm) { } log.Trace("Authentication created by admin(%s): %s", ctx.User.Name, form.AuthName) - ctx.Redirect("/admin/auths") + ctx.Redirect(setting.AppRootSubUrl + "/admin/auths") } func EditAuthSource(ctx *middleware.Context) { @@ -180,7 +181,7 @@ func EditAuthSourcePost(ctx *middleware.Context, form auth.AuthenticationForm) { log.Trace("Authentication changed by admin(%s): %s", ctx.User.Name, form.AuthName) ctx.Flash.Success(ctx.Tr("admin.auths.update_success")) - ctx.Redirect("/admin/auths/" + ctx.Params(":authid")) + ctx.Redirect(setting.AppRootSubUrl + "/admin/auths/" + ctx.Params(":authid")) } func DeleteAuthSource(ctx *middleware.Context) { @@ -200,12 +201,12 @@ func DeleteAuthSource(ctx *middleware.Context) { switch err { case models.ErrAuthenticationUserUsed: ctx.Flash.Error("form.still_own_user") - ctx.Redirect("/admin/auths/" + ctx.Params(":authid")) + ctx.Redirect(setting.AppRootSubUrl + "/admin/auths/" + ctx.Params(":authid")) default: ctx.Handle(500, "DelLoginSource", err) } return } log.Trace("Authentication deleted by admin(%s): %s", ctx.User.Name, a.Name) - ctx.Redirect("/admin/auths") + ctx.Redirect(setting.AppRootSubUrl + "/admin/auths") } |