Skip to content
This repository was archived by the owner on Dec 8, 2017. It is now read-only.

Commit 31a89b8

Browse files
author
Mike Bland
committed
Pass through bodyParser.json() middleware options
The public Hub push in #370 failed due to the webhook exceeding the default 100K limit, just as in 18F/pages#15. This applies the same fix as 18F/pages. Still waiting on coreh/hookshot#12 to get merged upstream, so I've already installed 18F/hookshot#json-options on the server: ``` npm install git+ssh://[email protected]/18F/hookshot.git#json-options ``` Note: I applied this in 18F/18f.gsa.gov#1102, but really should've just applied it here. No harm done, however.
1 parent 6ed56ac commit 31a89b8

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

deploy/hookshot.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ if (!branch || !command || !port) {
3030
process.exit(1);
3131
}
3232

33-
hookshot('refs/heads/' + branch, command).listen(port);
33+
// Passed through to bodyParser.json().
34+
// https://www.npmjs.com/package/body-parser#limit
35+
var json_options = { limit: 1 << 20 };
36+
37+
hookshot('refs/heads/' + branch, command, json_options).listen(port);
3438

3539
console.log("18F Hub: Listening on port " + port + " for push events on " + branch + ".")

0 commit comments

Comments
 (0)