NestJS Error https 통신중 unable to verify the first certificate 에러
NestJS으로 POST통신중 문제가 생겼고 해결을 해서 블로그에 남깁니다. import axios from 'axios' ; import { PushBodyDto } from 'src/type/sendPushMessage.dto' ; require ( 'dotenv' ). config (); const https = require ( 'https' ); export async function sendPushMessage ( body : PushBodyDto ) { return await axios . post ( process . env . NESTJS_RESTAPI_URL + '/push-noti/send/message' , { httpsAgent : new https . Agent ({ rejectUnauthorized : false , }), data : body , }) . then (( res ) => { console . log ( '푸시메세지 보낸후 데이터 : ' , res . data ); return res . data ; }) . catch (( err ) => { return err ; }) . finally (() => console . log ( '푸시메세지 요청 완료!' )); } 코드1) 초기 Post Request 코드 위 코드에서 POST요청으로 다른서버에 Push요청을 보내는 코드 입니다. 오류 발생시 무시하는 코드(rejectUnauthorized : true)를 넣었음에도 불구하고 아래와 같이 응답이 왔습니다. 응답데이터(Click) --------------------------------------------- ...