feat: option to disable note creation
The abuse of the demo instance required us to disallow note creation Signed-off-by: Erik Michelson <github@erik.michelson.eu> Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
committed by
Tilman Vatteroth
parent
c85b11463d
commit
858d7bf5d1
@@ -82,6 +82,9 @@ exports.showNote = function (req, res, next) {
|
||||
}
|
||||
|
||||
exports.createFromPOST = function (req, res, next) {
|
||||
if (config.disableNoteCreation) {
|
||||
return errors.errorForbidden(res)
|
||||
}
|
||||
let body = ''
|
||||
if (req.body && req.body.length > config.documentMaxLength) {
|
||||
return errors.errorTooLong(res)
|
||||
|
||||
Reference in New Issue
Block a user