mirror of
https://github.com/ehang-io/nps.git
synced 2025-09-02 11:56:53 +00:00
Port mux| https|tls crypt
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user