GET /index.jsl HTTP/1.1
Cookie: name=value
Other-header: other-header-value
发回给服务器的Cookie字段可用于唯一标识发送请求的客户端...({
msg: "获取token成功",
});
});
app.get("/getInfo", function (req, res) {
res.json({
msg: "...Cookie)
fetch('http://localhost:8088/token', {
method: 'post',
credentials: 'include'
})
当我们设置...({
msg: "获取token成功",
});
});
app.get("/getInfo", function (req, res) {
res.json({
msg: "...://localhost:8088,就是我们写的html,不跨域,自然就没有解决方案1中出现的问题了.