Quantcast
Channel: Active questions tagged https - Stack Overflow
Viewing all articles
Browse latest Browse all 1499

cannot Disable ssl verification in next js app [duplicate]

$
0
0

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.


Viewing all articles
Browse latest Browse all 1499

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>