mirror of https://github.com/status-im/codimd.git
Adds 403 response if PDF export is disabled
This commit is contained in:
parent
0be09e109f
commit
f7d2ef970a
|
@ -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 New Issue