This commit is contained in:
parent
a4105eab0f
commit
90fb113248
7
index.js
7
index.js
@ -46,7 +46,12 @@ http
|
||||
statusCode = 404;
|
||||
}
|
||||
|
||||
response.writeHead(statusCode, { "Content-Type": "application/json" });
|
||||
response.writeHead(statusCode, {
|
||||
"Access-Control-Allow-Origin": "*",
|
||||
"Access-Control-Allow-Methods": "OPTIONS, POST, GET",
|
||||
"Access-Control-Max-Age": 2592000, // 30 days
|
||||
"Content-Type": "application/json",
|
||||
});
|
||||
response.end(JSON.stringify(responseBody));
|
||||
})
|
||||
.listen(8888);
|
||||
|
Reference in New Issue
Block a user