diff options
-rwxr-xr-x | lib/response.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/response.js b/lib/response.js index f0f7ce9b..9e39ffb5 100755 --- a/lib/response.js +++ b/lib/response.js @@ -384,7 +384,12 @@ function noteActions (req, res, next) { actionInfo(req, res, note) break case 'pdf': - actionPDF(req, res, note) + if (config.allowpdfexport) { + actionPDF(req, res, note) + } else { + logger.error('PDF export failed: Disabled by config. Set "allowpdfexport: true" to enable. Check the documentation for details') + response.errorForbidden(res) + } break case 'gist': actionGist(req, res, note) |