-
Notifications
You must be signed in to change notification settings - Fork 20
Increase payload limit #14
Comments
So here's the stack trace:
I found this in /**
* Create a middleware to parse JSON bodies.
*
* @param {object} [options]
* @return {function}
* @api public
*/
function json(options) {
options = options || {}
var limit = typeof options.limit !== 'number'
? bytes(options.limit || '100kb')
: options.limit And wouldn't you know it, it's hardcoded in var bodyParser = require('body-parser');
var normalize = require('path').normalize;
var spawn = require('child_process').spawn;
var express = require('express');
module.exports = function (ref, action) {
// create express instance
var hookshot = express();
// middleware
hookshot.use(bodyParser.urlencoded({ extended: false }));
hookshot.use(bodyParser.json()); Lemme think for a minute how to get around this. I mean, who would ever need to parse a >100KB webhook payload? :-P |
18F/pages is a Hookshot server for https://pages.18f.gov/. Recently, as noted in 18F/pages#14, the default 100KB payload limit was exceeded by a webhook fired for uswds/uswds#54. This change will allow us to pass options through to the bodyParser.json() middleware to increase the limit.
As noted in #14, the default 100KB payload limit was exceeded by a webhook fired for uswds/uswds#54. Combined with 5d2ee1ec4899e8f4ff0e0f54bb16ac745df6d144 from 18F/hookshot, this change will allow us to pass options through to the bodyParser.json() middleware to increase the limit.
So the running server is fixed, but I'll keep this open until coreh/hookshot#12 and #15 are committed and the updated version of hookshot running on https://pages.18f.gov is installed from npm rather than from 18F/hookshot. |
Is this issue fixed or a workaround is available. I see last update was an year ago. I am unable to recollect how it can be resolved though we are waiting to committ. Error which i received: |
@divyatechryde I'm not sure coreh/hookshot#12 was committed. |
Merge 18f-pages-staging, including favicons
Recently we merged in a rather large pull request for the pattern library project and was rejected b/c of the size: uswds/uswds#54
The text was updated successfully, but these errors were encountered: