Jelajahi Sumber

user/auth: fix page not redirect after login

Unknwon 7 tahun lalu
induk
melakukan
4258bf3d54
3 mengubah file dengan 3 tambahan dan 3 penghapusan
  1. 1 1
      gogs.go
  2. 1 1
      routes/user/auth.go
  3. 1 1
      templates/.VERSION

+ 1 - 1
gogs.go

@@ -16,7 +16,7 @@ import (
 	"github.com/gogits/gogs/pkg/setting"
 )
 
-const APP_VER = "0.11.30.1014"
+const APP_VER = "0.11.31.1022"
 
 func init() {
 	setting.AppVer = APP_VER

+ 1 - 1
routes/user/auth.go

@@ -95,7 +95,6 @@ func Login(c *context.Context) {
 	} else {
 		redirectTo, _ = url.QueryUnescape(c.GetCookie("redirect_to"))
 	}
-	c.SetCookie("redirect_to", "", -1, setting.AppSubURL)
 
 	if isSucceed {
 		if isValidRedirect(redirectTo) {
@@ -103,6 +102,7 @@ func Login(c *context.Context) {
 		} else {
 			c.Redirect(setting.AppSubURL + "/")
 		}
+		c.SetCookie("redirect_to", "", -1, setting.AppSubURL)
 		return
 	}
 

+ 1 - 1
templates/.VERSION

@@ -1 +1 @@
-0.11.30.1014
+0.11.31.1022