mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
close HTTP keep-alive connections when shutting down
This commit is contained in:
parent
55c4e220fa
commit
74fc095913
1 changed files with 6 additions and 0 deletions
|
@ -62,6 +62,12 @@ app.use (req, res, 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.put "/project/:project_id/file/:file_id", keyBuilder.userFileKey, fileController.copyFile
|
||||
app.del "/project/:project_id/file/:file_id", keyBuilder.userFileKey, fileController.deleteFile
|
||||
|
||||
|
|
Loading…
Reference in a new issue