Skip to content
This repository has been archived by the owner on Mar 22, 2024. It is now read-only.

Commit

Permalink
Merge pull request #553 from Financial-Times/kb/max-http-header-size
Browse files Browse the repository at this point in the history
Override default maximum size of HTTP headers
  • Loading branch information
ker-an authored Feb 22, 2019
2 parents 0ada2df + 356a1fa commit 849d111
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tasks/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,16 @@ function runScript (opts) {
if (opts.subargs) {
args = args.concat(opts.subargs.replace(/^\[/, '').replace(/]$/, '').split(','));
}

/**
* The default maximum size of HTTP headers is 8KB.
* To override the default, we must pass in the --max-http-header-size option
* and specify a maximum size.
*
* @see https://nodejs.org/docs/latest-v8.x/api/cli.html#cli_max_http_header_size_size
*/
args.unshift('--max-http-header-size=80000');

return ['node', args, { cwd: process.cwd(), env: env }];
});
}
Expand Down

0 comments on commit 849d111

Please sign in to comment.