aboutsummaryrefslogtreecommitdiff
path: root/routers/user/social.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/social.go
parent4f74b4e6578be4251af65cd08daa37c884e431a0 (diff)
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/social.go')
-rw-r--r--routers/user/social.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/routers/user/social.go b/routers/user/social.go
index 07c6deed..fc2ea5fb 100644
--- a/routers/user/social.go
+++ b/routers/user/social.go
@@ -22,7 +22,7 @@ import (
func extractPath(next string) string {
n, err := url.Parse(next)
if err != nil {
- return "/"
+ return setting.AppRootSubUrl + "/"
}
return n.Path
}
@@ -88,7 +88,7 @@ func SocialSignIn(ctx *middleware.Context) {
return
}
case models.ErrOauth2NotAssociated:
- next = "/user/sign_up"
+ next = setting.AppRootSubUrl + "/user/sign_up"
default:
ctx.Handle(500, "social.SocialSignIn(GetOauth2)", err)
return