Skip to content

Commit

Permalink
feature: routes (including plugins) will be able to use express-valid…
Browse files Browse the repository at this point in the history
…ator for the forms
  • Loading branch information
gregorybesson committed Jul 15, 2017
1 parent bc28af1 commit cfc27a0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/server/app.js
Expand Up @@ -4,6 +4,7 @@ import fse from 'fs-extra'
import session from 'express-session'
import helmet from 'helmet'
import bodyParser from 'body-parser'
import expressValidator from'express-validator'
import exphbs from 'express-secure-handlebars'
import path from 'path'
//import crypto from 'crypto';
Expand Down Expand Up @@ -100,6 +101,7 @@ app.use(cookieParser())
app.use(passport.initialize())
app.use(passport.session())
app.use(bodyParser.urlencoded({limit: '1gb', extended: true, parameterLimit: 50000}))
app.use(expressValidator());
app.use(csrf({cookie: {secure: config.cookie.secure}}))
app.use(function(req, res, next) {
if (req.url.indexOf('/abe/') > -1 ) {
Expand Down

0 comments on commit cfc27a0

Please sign in to comment.