Skip to content

Commit

Permalink
feature: provide a usefull message when app data fails because securi…
Browse files Browse the repository at this point in the history
…ty is off (#1129)
  • Loading branch information
sbender9 authored Sep 17, 2020
1 parent c734b58 commit 77019da
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/interfaces/applicationData.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,15 @@ const userApplicationDataUrls = [
module.exports = function(app) {
if (app.securityStrategy.isDummy()) {
debug('ApplicationData disabled because security is off')

app.post(userApplicationDataUrls, (req, res) => {
res.status(405).send('security is not enabled')
})

app.post(applicationDataUrls, (req, res) => {
res.status(405).send('security is not enabled')
})

return
}

Expand Down

0 comments on commit 77019da

Please sign in to comment.