The code snippet below is currently being executed in the browser:
const response = await fetch(`${url}`, {
method: 'POST',
headers: {
Authorization: `Basic ${authorization}`,
},
body: loginData,
})
Upon calling this code, I receive the following response from the server:
<URL> net::ERR_CERT_AUTHORITY_INVALID
I am the owner of the server and it is utilizing a self-signed certificate.
In my fetch request, I aim to bypass or overlook the certificate validation process.
Attempts made so far include:
const response = await fetch(`${url}`, {
method: 'POST',
headers: {
Authorization: `Basic ${authorization}`,
},
body: loginData,
agent: false,
rejectUnauthorized: false,
})
However, the issue persists despite these adjustments.
Is there a way for me to successfully skip the validation?