if(req.url!=="/favicon.ico"){ console.log("here is ok"); res.writeHead(200,{"Content-Type":"text/plain","Access-Control-Allow-Origin":"http://localhost:"}); res.header("Access-Control-Allow-Origin","*"); res.send(fileb); } 为什么运行时报错: res.header is not a function
回复 (3)
L
@thesadboy 应该怎么设置?
L
@thesadboy 我用express就好了,谢谢啊
J
res.header 是哪门子写法?
参与回复
登录后即可参与回复。登录