Skip to content

Commit

Permalink
feat: 重定向至登录页面
Browse files Browse the repository at this point in the history
  • Loading branch information
devhaozi committed Jul 12, 2024
1 parent 51b4781 commit 6c6fb09
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/http/middleware/entrance.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func Entrance() http.Middleware {
entrance := facades.Config().GetString("http.entrance")
if ctx.Request().Path() == entrance {
ctx.Request().Session().Put("verify_entrance", true)
_ = ctx.Response().Redirect(http.StatusFound, "/").Render()
_ = ctx.Response().Redirect(http.StatusFound, "/login").Render()
ctx.Request().AbortWithStatus(http.StatusFound)
return
}
Expand Down

0 comments on commit 6c6fb09

Please sign in to comment.