Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

598
Vistas
Configuring Certificates in Axios using Nest JS

I'm using Nest JS to run a local service which will send some data to an online service. We don't have a SSL certificate for now and the requests aren't working due to that. How can I configure Axios to accept the connection without a certificate in Nest JS? I've seen some instructions in node but they did not translate well to the Nest JS implementation of Axios.

Error

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

To alow axios to accept all certificates and ignore CertificateError You need to configure axios to use a custom agent and set rejectUnauthorized to false for that agent

 // At instance level
    const instance = axios.create({
      httpsAgent: new https.Agent({  
        rejectUnauthorized: false
      })
    });
instance.get('https://example.com/API/test');

// At request level
const agent = new https.Agent({  
  rejectUnauthorized: false
});
axios.get('https://example.com/API/test', { httpsAgent: agent });
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda