Commit e14c42b7 authored by Thomas Pétillon's avatar Thomas Pétillon
Browse files

Add cross-origin resource sharing (CORS) headers to responses

parent e941cc19
......@@ -32,6 +32,7 @@
},
"dependencies": {
"body-parser": "^1.17.2",
"cors": "^2.8.4",
"express": "^4.15.3",
"pic4carto": "^1.2.3",
"use-strict": "^1.0.1",
......
......@@ -23,9 +23,13 @@ global.XMLHttpRequest.DONE = 4;
const express = require('express'),
bodyParser = require('body-parser'),
cors = require('cors'),
app = express(),
port = process.env.PORT || 28111;
app.use(cors());
app.options('*', cors());
app.use(bodyParser.urlencoded({ extended: true }));
app.use(bodyParser.json());
app.use('/doc', express.static(__dirname+'/doc'));
......
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