Closed sandywk closed 3 years ago
Are you using a self-signed SSL certificate?
what should i do if i am using a self-signed SSL? any override method?
@lawrezzz
const https = require("https");
const options = {
agent: new https.Agent({
rejectUnauthorized: false
})
};
fetch(url, options)
In dev or test environment we should set
process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';
That would solve at env scope.
next.js + isomorphic-fetch
error:
request to https://...... failed, reason: unable to verify the first certificate
What should I do?