Browse Source

🐞 fix: 忽略证书验证

Pchen. 1 month ago
parent
commit
0fc36ca80d
1 changed files with 5 additions and 0 deletions
  1. 5 0
      apis/User/uniLogin/Login.js

+ 5 - 0
apis/User/uniLogin/Login.js

@@ -26,7 +26,12 @@ class Login extends API {
 
         let url = `${uniConfig.url}/connect.php?act=callback&appid=${uniConfig.appid}&appkey=${uniConfig.appkey}&type=${type || 'qq'}&code=${code}`
         try {
+            const agent = new https.Agent({
+                rejectUnauthorized: false
+            })
+
             const r = await axios.get(url, {
+                httpsAgent: agent,
                 proxy: false
             })