diff --git a/kernel/model/session.go b/kernel/model/session.go index 5e54ddfb2..53ba90f58 100644 --- a/kernel/model/session.go +++ b/kernel/model/session.go @@ -204,7 +204,7 @@ func CheckAuth(c *gin.Context) { } } - if strings.HasSuffix(c.Request.RequestURI, "/check-auth") { + if "/check-auth" == c.Request.URL.Path { // 跳过访问授权页 c.Next() return } @@ -228,11 +228,5 @@ func CheckAuth(c *gin.Context) { return } - if u := c.Query("url"); "" != u { - c.Redirect(302, u) - c.Abort() - return - } - c.Next() } diff --git a/kernel/sql/database.go b/kernel/sql/database.go index 39b4d6e42..e9e592f9c 100644 --- a/kernel/sql/database.go +++ b/kernel/sql/database.go @@ -215,7 +215,7 @@ func initHistoryDBConnection() { historyDB.Close() } - dsn := util.DBPath + "?_journal_mode=WAL" + + dsn := util.HistoryDBPath + "?_journal_mode=WAL" + "&_synchronous=OFF" + "&_mmap_size=2684354560" + "&_secure_delete=OFF" +