My nest js backend is on my local network with self signed certificate in https.In my next js front end i want to call my api at https://back-address/login:4000 but since it's a dev certificate self signed i get an error:POST http://back-address:4000/auth/login net::ERR_EMPTY_RESPONSEOn postman it works when i disable ssl verification.
I tried to set env variable to NODE_TLS_REJECT_UNAUTHORIZED=0 but it didn't change anything i still had the same error
I also tried
const instance = axios.create({ httpsAgent: new https.Agent({ rejectUnauthorized: false }) }); const response = await instance.post(URL +"/auth/login", { login, password, });
But it didn't change anything neither.