Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

axios httsagent

import https from 'https'
import axios from 'axios'
import config from '~/config'

/**
 * Axios default settings
 */
axios.defaults.baseURL = config.apiURL

/**
 * Disable only in development mode
 */
if (process.env.NODE_ENV === 'development') {
  const httpsAgent = new https.Agent({
    rejectUnauthorized: false,
  })
  axios.defaults.httpsAgent = httpsAgent
  // eslint-disable-next-line no-console
  console.log(process.env.NODE_ENV, `RejectUnauthorized is disabled.`)
}
Comment

PREVIOUS NEXT
Code Example
Javascript :: get buildspec.yml file for react app 
Javascript :: ionic vue use .env 
Javascript :: Match All Letters and Numbers freecodecamp 
Javascript :: Using a decrementing For Loop to Reverse an Array 
Javascript :: adding hbs partials in express.js 
Javascript :: angular debug chrome launch.json 
Javascript :: java script to send email 
Javascript :: version check 
Javascript :: find consecutive numbers in an array javascript 
Javascript :: vscode jest disable auto run 
Javascript :: html select multiple selected values 
Javascript :: react native fontsize not affected by phone settings 
Javascript :: how to call api on load using hooks in react 
Javascript :: json date serialize 
Javascript :: jquery script cdn stackoverflow 
Javascript :: array destructuring by using spread operator from a nested object in javascript 
Javascript :: nodejs mysql error handling with user example 
Javascript :: vue js data property in component must be a function 
Javascript :: javascript get elements by multiple class names 
Javascript :: node express tutorial 
Javascript :: quitar checked jquery 
Javascript :: to do list app react code 
Javascript :: how to hide footer in specefic pages in react router 
Javascript :: form serialze submit button 
Javascript :: react features 
Javascript :: validar correo electronico en js 
Javascript :: brain.js 
Javascript :: splice 
Javascript :: jquery has class 
Javascript :: javascript sort 2d array 
ADD CONTENT
Topic
Content
Source link
Name
4+8 =