Commit 3bbab12b authored by Patrick's avatar Patrick
Browse files

test cors

parent d9a37f1b
......@@ -9,6 +9,12 @@ const request = require('ajax-request');
const app = express();
app.all('*', function(req, res, next) {
res.header('Access-Control-Allow-Origin', '*');
res.header('Access-Control-Allow-Methods', 'PUT, GET, POST, DELETE, OPTIONS');
res.header('Access-Control-Allow-Headers', 'Content-Type');
next();
});
app.use(bodyParser.urlencoded({ extended: false }))
app.use(bodyParser.json())
// Certificate
......
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