commit
4606e6e953
@ -49,6 +49,13 @@ InsightAPI.prototype.start = function(callback) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
InsightAPI.prototype.setupRoutes = function(app) {
|
InsightAPI.prototype.setupRoutes = function(app) {
|
||||||
|
//Enable CORS
|
||||||
|
app.use(function(req, res, next) {
|
||||||
|
res.header('Access-Control-Allow-Origin', '*');
|
||||||
|
res.header('Access-Control-Allow-Headers', 'Origin, X-Requested-With, Content-Type, Accept');
|
||||||
|
next();
|
||||||
|
});
|
||||||
|
|
||||||
//Block routes
|
//Block routes
|
||||||
var blocks = new BlockController(this.node);
|
var blocks = new BlockController(this.node);
|
||||||
app.get('/blocks', blocks.list.bind(blocks));
|
app.get('/blocks', blocks.list.bind(blocks));
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user