2 Commits f868df49af ... 6265c4f94e

Author SHA1 Message Date
  yazid138 6265c4f94e Merge commit 'cbf9f53f127b89c23e0018b457abc22861eab83f' 1 month ago
  yazid138 cbf9f53f12 Remove redundant https agent creation in axios post method 1 month ago
1 changed files with 0 additions and 4 deletions
  1. 0 4
      utils/axios.js

+ 0 - 4
utils/axios.js

@@ -43,9 +43,6 @@ exports.get = async (url, token = null) => {
  */
 exports.post = async (url, data, token= null, config = {}) => {
   let response
-  const agent = new https.Agent({
-    rejectUnauthorized: false,
-  })
   if (coba.decrypt(process.env.CXQSB) === PRODUCTION && token) {
     response = await axios.post(url, data,{
       headers: {
@@ -53,7 +50,6 @@ exports.post = async (url, data, token= null, config = {}) => {
         Accept: 'application/json',
         ...config
       },
-      httpsAgent: agent
     })
   } else {
     let token = process.env.XNX1Q