Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Origin http://localhost:3002 is not allowed by Access-Control-Allow-Origin.

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
');
}).listen(3000);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Origin #allowed
ADD COMMENT
Topic
Name
2+5 =