测试
This commit is contained in:
+7
-3
@@ -302,7 +302,7 @@ func (that *Application) handler(w http.ResponseWriter, req *http.Request) {
|
||||
if that.Config.GetString("crossDomain") == "" {
|
||||
http.SetCookie(w, &http.Cookie{Name: that.Config.GetString("sessionName"), Value: sessionId, Path: "/"})
|
||||
} else {
|
||||
//跨域允许需要设置cookie的允许跨域
|
||||
//跨域允许需要设置cookie的允许跨域https才有效果
|
||||
w.Header().Set("Set-Cookie", that.Config.GetString("sessionName")+"="+sessionId+"; SameSite=None; Secure")
|
||||
}
|
||||
} else {
|
||||
@@ -459,9 +459,13 @@ func Init(config string) Application {
|
||||
appIns.SetCache()
|
||||
appIns.MakeCode = &code.MakeCode{}
|
||||
codeConfig := appIns.Config.GetMap("codeConfig")
|
||||
if codeConfig != nil && appIns.Config.GetInt("mode") == 2 {
|
||||
if codeConfig != nil {
|
||||
for k, _ := range codeConfig {
|
||||
appIns.MakeCode.Db2JSON(k, codeConfig.GetString(k), appIns.Db)
|
||||
if appIns.Config.GetInt("mode") == 2{
|
||||
appIns.MakeCode.Db2JSON(k, codeConfig.GetString(k), &appIns.Db)
|
||||
}else{
|
||||
appIns.MakeCode.Db2JSON(k, codeConfig.GetString(k), nil)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user