Add configurable max_doc_length

This commit is contained in:
James Allen 2015-11-06 12:42:44 +00:00
parent 29c812cece
commit 27d3ebc1fd
2 changed files with 4 additions and 1 deletions

View file

@ -19,7 +19,8 @@ app.use Metrics.http.monitor(logger)
app.get '/project/:project_id/doc', HttpController.getAllDocs
app.get '/project/:project_id/doc/:doc_id', HttpController.getDoc
app.get '/project/:project_id/doc/:doc_id/raw', HttpController.getRawDoc
app.post '/project/:project_id/doc/:doc_id', bodyParser.json(limit: "2mb"), HttpController.updateDoc
# Add 16kb overhead for the JSON encoding
app.post '/project/:project_id/doc/:doc_id', bodyParser.json(limit: Settings.max_doc_size + 16 * 1024), HttpController.updateDoc
app.del '/project/:project_id/doc/:doc_id', HttpController.deleteDoc
app.post '/project/:project_id/archive', HttpController.archiveAllDocs

View file

@ -17,3 +17,5 @@ module.exports =
# key: ""
# secret: ""
# bucket: "something"
max_doc_size: 2 * 1024 * 1024 # 2mb