Adds 403 response if PDF export is disabled
This commit is contained in:
parent
0be09e109f
commit
f7d2ef970a
1 changed files with 6 additions and 1 deletions
|
@ -384,7 +384,12 @@ function noteActions (req, res, next) {
|
||||||
actionInfo(req, res, note)
|
actionInfo(req, res, note)
|
||||||
break
|
break
|
||||||
case 'pdf':
|
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
|
break
|
||||||
case 'gist':
|
case 'gist':
|
||||||
actionGist(req, res, note)
|
actionGist(req, res, note)
|
||||||
|
|
Loading…
Reference in a new issue