Access-Control-Allow-Origin
Setting 'Access-Control-Allow-Origin' to header of response to allow browsers to access response.
This commit is contained in:
parent
685a383c8e
commit
87a578e37b
@ -7,6 +7,7 @@ module.exports = function Server(port, client, intra) {
|
||||
var refresher; //container for refresher
|
||||
|
||||
const server = http.createServer((req, res) => {
|
||||
res.setHeader("Access-Control-Allow-Origin", "*");
|
||||
if (req.method === "GET") {
|
||||
//GET: requesting data
|
||||
let u = url.parse(req.url, true);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user