summaryrefslogtreecommitdiff
path: root/lib/web
diff options
context:
space:
mode:
authorBoHong Li2017-04-12 05:31:22 +0800
committerRaccoon Li2017-05-08 19:24:37 +0800
commit9f1f16c8e347f2bb2c0c6ab1b71c1a683a413a90 (patch)
treeac3f77d410aabc3944d5ed80236bd454b2794e99 /lib/web
parentdee77c459a929d7e0041fae38176b71248a9ff9c (diff)
refactor(app.js): Extract urlencodedParser to utils module
Diffstat (limited to 'lib/web')
-rw-r--r--lib/web/utils.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/web/utils.js b/lib/web/utils.js
new file mode 100644
index 00000000..c9016523
--- /dev/null
+++ b/lib/web/utils.js
@@ -0,0 +1,9 @@
+'use strict'
+
+const bodyParser = require('body-parser')
+
+// create application/x-www-form-urlencoded parser
+exports.urlencodedParser = bodyParser.urlencoded({
+ extended: false,
+ limit: 1024 * 1024 * 10 // 10 mb
+})