secure: false
mylastore opened this issue · 2 comments
mylastore commented
Is there a way to pass secrure: false or something equivalent like on webpack proxing?
or
disable ssl verification?
I am connecting to https://website.se but I need to pass secrure false since our certificates are not valid and all is in our local network.
Config:
{
src: '/api/.*',
dest: (req, res) => {
console.log('URL? ', req)
req.url = req.url.replace(/^\/api/, '');
console.log('URL? ', req.url)
return proxy.web(req, res, {
hostname: 'some.url.com',
protocol: 'https'
})
},
},
],
I get this error with the following
(node:90948) UnhandledPromiseRejectionWarning: Error: unable to verify the first certificate
at TLSSocket.onConnectSecure (_tls_wrap.js:1497:34)
at TLSSocket.emit (events.js:315:20)
at TLSSocket._finishInit (_tls_wrap.js:932:8)
at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:706:12)
(Use `node --trace-warnings ...` to show where the warning was created)
matus-sabo commented
u can pass rejectUnauthorized: false
return proxy.web(req, res, {
hostname: 'some.url.com',
protocol: 'https',
rejectUnauthorized: false
})
mylastore commented
u can pass
rejectUnauthorized: false
return proxy.web(req, res, { hostname: 'some.url.com', protocol: 'https', rejectUnauthorized: false })
Thanks