【发布时间】:2020-07-12 02:08:35
【问题描述】:
我正在尝试在 axios 中禁用角度 SSL 验证。我试过使用
axios.get(url, {
httpsAgent: new https.Agent({
rejectUnauthorized: false
})
})
但它显示错误Cannot find name 'https'.ts(2304)。所以我导入了https,然后它抛出了一个新错误Module not found: Error: Can't resolve 'https'
有没有办法在 axios 中禁用 SSL 验证?
【问题讨论】:
标签: angular typescript axios