开始新增代码生成配置2.0功能,配置文件格式规定完成
This commit is contained in:
+4
-4
@@ -303,7 +303,7 @@ func (that *Application) handler(w http.ResponseWriter, req *http.Request) {
|
||||
http.SetCookie(w, &http.Cookie{Name: that.Config.GetString("sessionName"), Value: sessionId, Path: "/"})
|
||||
} else {
|
||||
//跨域允许需要设置cookie的允许跨域https才有效果
|
||||
w.Header().Set("Set-Cookie", that.Config.GetString("sessionName")+"="+sessionId+"; SameSite=None; Secure")
|
||||
w.Header().Set("Set-Cookie", that.Config.GetString("sessionName")+"="+sessionId+"; Path=/; SameSite=None; Secure")
|
||||
}
|
||||
} else {
|
||||
sessionId = cookie.Value
|
||||
@@ -459,11 +459,11 @@ func Init(config string) Application {
|
||||
appIns.SetCache()
|
||||
appIns.MakeCode = &code.MakeCode{}
|
||||
codeConfig := appIns.Config.GetMap("codeConfig")
|
||||
if codeConfig != nil {
|
||||
if codeConfig != nil {
|
||||
for k, _ := range codeConfig {
|
||||
if appIns.Config.GetInt("mode") == 2{
|
||||
if appIns.Config.GetInt("mode") == 2 {
|
||||
appIns.MakeCode.Db2JSON(k, codeConfig.GetString(k), &appIns.Db)
|
||||
}else{
|
||||
} else {
|
||||
appIns.MakeCode.Db2JSON(k, codeConfig.GetString(k), nil)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user