mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-25 19:26:31 -05:00
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)
|
||||
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)
|
||||
|
|
Loading…
Reference in a new issue