Browse Source

Merge pull request #642 from matiu/feat/abort

Feat/abort
feat/estimateFee-limit
Ivan Socolsky 8 years ago
committed by GitHub
parent
commit
752f86029a
  1. 10
      lib/expressapp.js

10
lib/expressapp.js

@ -54,6 +54,16 @@ ExpressApp.prototype.start = function(opts, cb) {
this.app.use(allowCORS);
this.app.enable('trust proxy');
// handle `abort` https://nodejs.org/api/http.html#http_event_abort
this.app.use(function (req, res, next) {
req.on('abort', function() {
log.warn('Request aborted by the client');
});
next();
});
var POST_LIMIT = 1024 * 100 /* Max POST 100 kb */ ;
this.app.use(bodyParser.json({

Loading…
Cancel
Save