mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 06:03:45 +01:00
move connection:close middleware ahead of other routes
This commit is contained in:
@@ -61,15 +61,15 @@ app.use (req, res, next) ->
|
||||
logger.err err: exception, "exception in request domain handler"
|
||||
requestDomain.run next
|
||||
|
||||
app.get "/project/:project_id/file/:file_id", keyBuilder.userFileKey, fileController.getFile
|
||||
app.post "/project/:project_id/file/:file_id", keyBuilder.userFileKey, fileController.insertFile
|
||||
|
||||
app.use (req, res, next) ->
|
||||
if not appIsOk
|
||||
# when shutting down, close any HTTP keep-alive connections
|
||||
res.set 'Connection', 'close'
|
||||
next()
|
||||
|
||||
app.get "/project/:project_id/file/:file_id", keyBuilder.userFileKey, fileController.getFile
|
||||
app.post "/project/:project_id/file/:file_id", keyBuilder.userFileKey, fileController.insertFile
|
||||
|
||||
app.put "/project/:project_id/file/:file_id", keyBuilder.userFileKey, fileController.copyFile
|
||||
app.del "/project/:project_id/file/:file_id", keyBuilder.userFileKey, fileController.deleteFile
|
||||
|
||||
|
||||
Reference in New Issue
Block a user