hof 20.5.6 → 20.5.7-Beta-payload-too-large

Sign up to get free protection for your applications and to get access to all the features.
@@ -22,6 +22,8 @@ const defaults = {
22
22
  env: process.env.NODE_ENV || 'development',
23
23
  gaTagId: process.env.GA_TAG || 'Test-GA-Tag',
24
24
  ga4TagId: process.env.GA_4_TAG,
25
+ urlEncodedLimitSize : process.env.URL_ENCODED_LIMIT_SIZE || '100kb',
26
+ jsonLimitSize : process.env.JSON_LIMIT_SIZE || '100kb',
25
27
  // added to allow support for multiple HOF forms using GTM to customize how they track page views
26
28
  gtm: {
27
29
  tagId: process.env.GTM_TAG || false,
package/lib/settings.js CHANGED
@@ -29,7 +29,7 @@ module.exports = async (app, config) => {
29
29
  res.locals.assetPath = '/public';
30
30
  next();
31
31
  });
32
-
32
+
33
33
  app.use(config.theme());
34
34
 
35
35
  const filteredViews = filterEmptyViews(config.theme.views);
@@ -54,12 +54,13 @@ module.exports = async (app, config) => {
54
54
  app.use(expressPartialTemplates(app));
55
55
 
56
56
  app.engine(viewEngine, hoganExpressStrict);
57
-
57
+
58
58
  app.use(bodyParser.urlencoded({
59
+ limit: config.urlEncodedLimitSize,
59
60
  extended: true
60
61
  }));
61
62
 
62
- app.use(bodyParser.json());
63
+ app.use(bodyParser.json({limit: config.jsonLimitSize}));
63
64
 
64
65
  app.use((req, res, next) => {
65
66
  res.locals.baseUrl = req.baseUrl;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "hof",
3
3
  "description": "A bootstrap for HOF projects",
4
- "version": "20.5.6",
4
+ "version": "20.5.7-Beta-payload-too-large",
5
5
  "license": "MIT",
6
6
  "main": "index.js",
7
7
  "author": "HomeOffice",