aboutsummaryrefslogtreecommitdiffhomepage
path: root/server.js
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2015-11-07 14:16:26 +0100
committerChocobozzz <florian.bigard@gmail.com>2015-11-07 14:16:26 +0100
commit34ca3b5225479a5da986c86ee4c42a73ae6df5ad (patch)
tree561ba5ae1adccd5729305a8cc17d13d24a0c2ddb /server.js
parentf5a60a5138135a3412dfbcfd6e564f7aa47a55c2 (diff)
downloadPeerTube-34ca3b5225479a5da986c86ee4c42a73ae6df5ad.tar.gz
PeerTube-34ca3b5225479a5da986c86ee4c42a73ae6df5ad.tar.zst
PeerTube-34ca3b5225479a5da986c86ee4c42a73ae6df5ad.zip
Add requests parameters validations
Diffstat (limited to 'server.js')
-rw-r--r--server.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/server.js b/server.js
index d3718f8de..317d8c3cd 100644
--- a/server.js
+++ b/server.js
@@ -6,6 +6,7 @@
6 6
7 // ----------- Node modules ----------- 7 // ----------- Node modules -----------
8 var express = require('express') 8 var express = require('express')
9 var expressValidator = require('express-validator')
9 var path = require('path') 10 var path = require('path')
10 var morgan = require('morgan') 11 var morgan = require('morgan')
11 var bodyParser = require('body-parser') 12 var bodyParser = require('body-parser')
@@ -47,6 +48,7 @@
47 app.use(bodyParser.json()) 48 app.use(bodyParser.json())
48 app.use(multer({ dest: uploads })) 49 app.use(multer({ dest: uploads }))
49 app.use(bodyParser.urlencoded({ extended: false })) 50 app.use(bodyParser.urlencoded({ extended: false }))
51 app.use(expressValidator())
50 52
51 // ----------- Views, routes and static files ----------- 53 // ----------- Views, routes and static files -----------
52 54