Port mux| https|tls crypt

This commit is contained in:
刘河
2019-03-05 09:23:18 +08:00
parent a29a7d4923
commit f81fb7760e
39 changed files with 706 additions and 251 deletions

View File

@@ -15,11 +15,11 @@ func (s *AuthController) GetAuthKey() {
s.Data["json"] = m
s.ServeJSON()
}()
if cryptKey := beego.AppConfig.String("cryptKey"); len(cryptKey) != 16 {
if cryptKey := beego.AppConfig.String("auth_crypt_key"); len(cryptKey) != 16 {
m["status"] = 0
return
} else {
b, err := crypt.AesEncrypt([]byte(beego.AppConfig.String("authKey")), []byte(cryptKey))
b, err := crypt.AesEncrypt([]byte(beego.AppConfig.String("auth_key")), []byte(cryptKey))
if err != nil {
m["status"] = 0
return