|
@@ -91,10 +91,11 @@ func encoding(data interface{}) interface{} {
|
|
|
logger.Error("json 序列化失败", err)
|
|
|
return data
|
|
|
}
|
|
|
- if htConfig.NeedEncode() {
|
|
|
- content = authUtils.DesBase64Encrypt(content, htConfig.GetDesCode())
|
|
|
- content = []byte(`"` + string(content) + `"`)
|
|
|
+ if !htConfig.NeedEncode() {
|
|
|
+ return data
|
|
|
}
|
|
|
+ content = authUtils.DesBase64Encrypt(content, htConfig.GetDesCode())
|
|
|
+ content = []byte(`"` + string(content) + `"`)
|
|
|
return content
|
|
|
}
|
|
|
func AuthMiddleware() web.FilterFunc {
|