hof 20.5.6-payload-too-large → 20.5.7-Beta-payload-too-large
Sign up to get free protection for your applications and to get access to all the features.
- package/config/hof-defaults.js +2 -0
- package/lib/settings.js +3 -3
- package/package.json +1 -1
package/config/hof-defaults.js
CHANGED
@@ -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);
|
@@ -56,11 +56,11 @@ module.exports = async (app, config) => {
|
|
56
56
|
app.engine(viewEngine, hoganExpressStrict);
|
57
57
|
|
58
58
|
app.use(bodyParser.urlencoded({
|
59
|
-
limit:
|
59
|
+
limit: config.urlEncodedLimitSize,
|
60
60
|
extended: true
|
61
61
|
}));
|
62
62
|
|
63
|
-
app.use(bodyParser.json({limit:
|
63
|
+
app.use(bodyParser.json({limit: config.jsonLimitSize}));
|
64
64
|
|
65
65
|
app.use((req, res, next) => {
|
66
66
|
res.locals.baseUrl = req.baseUrl;
|