Merge pull request #422 from braydonf/urlencoded

Fixed bug with parsing urlencoded post data.
This commit is contained in:
Matias Alejo Garcia 2016-01-07 14:16:44 -03:00
commit d9fe157f41
2 changed files with 4 additions and 0 deletions

View File

@ -1,5 +1,6 @@
'use strict';
var bodyParser = require('body-parser');
var BaseService = require('./service');
var inherits = require('util').inherits;
var BlockController = require('./blocks');
@ -86,6 +87,8 @@ InsightAPI.prototype.start = function(callback) {
InsightAPI.prototype.setupRoutes = function(app) {
app.use(bodyParser.urlencoded({extended: true}));
//Enable CORS
app.use(function(req, res, next) {
res.header('Access-Control-Allow-Origin', '*');

View File

@ -63,6 +63,7 @@
"async": "*",
"bitcore-lib": "^0.13.7",
"bitcore-message": "^1.0.1",
"body-parser": "^1.13.3",
"lodash": "^2.4.1",
"request": "^2.64.0"
},