mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge pull request #11532 from overleaf/tm-nginx-prestop-shutdown-delay
Prevent dropbox webhook failures by gracefully shutting down web GitOrigin-RevId: 32c3a699c22402a5829ba2c8fe7c6ae829b08dbf
This commit is contained in:
parent
c7d3cb0561
commit
3c27970678
1 changed files with 3 additions and 1 deletions
|
@ -1212,7 +1212,9 @@ function initialize(webRouter, privateApiRouter, publicApiRouter) {
|
|||
})
|
||||
|
||||
publicApiRouter.get('/status', (req, res) => {
|
||||
if (!Settings.siteIsOpen) {
|
||||
if (Settings.shuttingDown) {
|
||||
res.sendStatus(503) // Service unavailable
|
||||
} else if (!Settings.siteIsOpen) {
|
||||
plainTextResponse(res, 'web site is closed (web)')
|
||||
} else if (!Settings.editorIsOpen) {
|
||||
plainTextResponse(res, 'web editor is closed (web)')
|
||||
|
|
Loading…
Reference in a new issue