In my app (sails 0.12.0) I want to extend a limit of bytes send upon POST request. So in my config/http.js
I am uncommenting bodyParser
and set it to:
module.exports.http = {
...
middleware: {
...
bodyParser: (function () {
var opts = {limit: 1024*1024*5}; // set it to 5 megabytes
var fn;
// Default to built-in bodyParser:
fn = require('skipper');
return fn(opts);
})()
...
}
...
}
But now each my request seems to hang and in result I get 502 bad gateway
in every request sent from browser.
So:
- how do I initialize correctly
skipper
and extend allowed bytes limit? - why all my request now ends up with 502?
EDIT as @sgress454 inquired about where exactly bodyParser
is located I'have decided to precise it in initial question. In short it was located just where it is commented out in default config - under middleware
object.
It turns out it's a bug and the issue has been created, so please follow it for further development.