📌  相关文章
📜  Access-Control-Allow-Origin 不允许来源 http: localhost:3002. - 无论代码示例

📅  最后修改于: 2022-03-11 14:58:13.238000             🧑  作者: Mango

代码示例3
var http = require('http');

http.createServer(function (request, response) {
response.writeHead(200, {
    'Content-Type': 'text/plain',
    'Access-Control-Allow-Origin' : '*',
    'Access-Control-Allow-Methods': 'GET,PUT,POST,DELETE'
});
response.end('Hello World\n');
}).listen(3000);