mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-07 08:09:01 +02: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:
@@ -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)')
|
||||
|
||||
Reference in New Issue
Block a user