Browse Source

Remove redundant https agent creation in axios post method

yazid138 1 month ago
parent
commit
cbf9f53f12
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