Charles抓包为什么看不到本地React开发的HTTPS请求?
我在用 create-react-app 搭建的项目里调用后端接口,本地启的是 https://localhost:3000,但 Charles 完全抓不到这些请求,明明代理已经开了,其他 HTTP 请求都能看到。是不是因为 HTTPS 的问题?我试过在 Charles 里装了 SSL 证书,也信任了,但还是不行。
这是我的请求代码:
useEffect(() => {
fetch('https://api.example.com/data', {
method: 'GET',
credentials: 'include'
})
.then(res => res.json())
.then(data => console.log(data));
}, []);
暂无解答