Cannot set headers after they are sent to the client
来源:7-3 cookie用于登录验证

可达鸭_
2021-08-11
跟着老师一点一点敲得,找不到 哪里 res.end()了一次啊
![
解决不了错误
解决了。。。前面不能
res.writeHead(200, {
“Access-Control-Allow-Origin”: “",
“Content-Type”: “application/json;charser=utf-8”
})
要改成
res.setHeader(“Access-Control-Allow-Origin”,"”)
res.setHeader(“Content-Type”,“application/json;charser=utf-8”)
写回答
1回答
-
双越
2021-08-11
解决就好😄
022021-08-12
相似问题