Commit 1d119f69 authored by nanamicat's avatar nanamicat

cors

parent f87ebe85
...@@ -32,7 +32,7 @@ socket.bind(config.port); ...@@ -32,7 +32,7 @@ socket.bind(config.port);
//web management api //web management api
http http
.createServer(function(req, res) { .createServer(function(req, res) {
res.writeHead(200, { 'Content-Type': 'application/json' }); res.writeHead(200, { 'Content-Type': 'application/json', 'Access-Control-Allow-Origin': '*' });
const result = Router.all.map(from => ({ const result = Router.all.map(from => ({
id: from.id, id: from.id,
name: from.name, name: from.name,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment