EExcel 丞燕快速查詢2

EExcel 丞燕快速查詢2
EExcel 丞燕快速查詢2 https://sandk.ffbizs.com/

node 8 nodejs ssl handshake error




const https = require('https');

export async function GetUserinfo(Token) {
    console.log(process.env["NODE_TLS_REJECT_UNAUTHORIZED"])
    process.env["NODE_TLS_REJECT_UNAUTHORIZED"] = 0;
    console.log(process.env["NODE_TLS_REJECT_UNAUTHORIZED"])  

    const baseURL = 'https://openid.hydra:9001';
    const userinfoURL = '/userinfo';

    axios({
        method: 'get',
        headers: {
          'Authorization': 'Bearer ' + Token,
          'accept': 'application/json'
        },
        httpsAgent: new https.Agent({
            rejectUnauthorized: false,
            ecdhCurve: 'auto'
        }),
        url: userinfoURL,
        baseURL: baseURL,
        responseType: 'json'
    }).then(function (response) {


process.env["NODE_TLS_REJECT_UNAUTHORIZED"] = 0;

No Need, No mean

Error: self signed certificate



Answer: rejectUnauthorized: false,

HTTPs requests to API fail: 'sslv3 alert handshake failure



Answer: ecdhCurve: 'auto'