Skip to content

Commit

Permalink
only run autodata once, and only on POST requests
Browse files Browse the repository at this point in the history
  • Loading branch information
joelanman committed Feb 17, 2017
1 parent c552b73 commit b4856ae
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ if (env === 'production' && useHttps === 'true') {
console.log({'autodata': useAutoStoreData})

if (useAutoStoreData === 'true') {
app.use(utils.autoStoreData)
app.post('*', utils.autoStoreData)
app.use(function (req, res, next) {
// add nunjucks function to get values, needs to be here as they need access to req.session

Expand All @@ -147,7 +147,6 @@ if (useAutoStoreData === 'true') {
next()
})

documentationApp.use(utils.autoStoreData)
documentationApp.use(function (req, res, next) {
// add nunjucks function to get values, needs to be here as they need access to req.session

Expand Down

0 comments on commit b4856ae

Please sign in to comment.