mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Merge pull request #286 from sharelatex/ha-editor-close
fix close editor button
This commit is contained in:
commit
f7a0860f0b
1 changed files with 6 additions and 6 deletions
|
@ -101,19 +101,19 @@ if app.get('env') == 'production'
|
||||||
logger.info "Production Enviroment"
|
logger.info "Production Enviroment"
|
||||||
app.enable('view cache')
|
app.enable('view cache')
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
app.use (req, res, next)->
|
app.use (req, res, next)->
|
||||||
metrics.inc "http-request"
|
metrics.inc "http-request"
|
||||||
crawlerLogger.log(req)
|
crawlerLogger.log(req)
|
||||||
next()
|
next()
|
||||||
|
|
||||||
app.use (req, res, next) ->
|
webRouter.use (req, res, next) ->
|
||||||
if !Settings.editorIsOpen
|
if Settings.editorIsOpen
|
||||||
|
next()
|
||||||
|
else if req.url.indexOf("/admin") == 0
|
||||||
|
next()
|
||||||
|
else
|
||||||
res.status(503)
|
res.status(503)
|
||||||
res.render("general/closed", {title:"maintenance"})
|
res.render("general/closed", {title:"maintenance"})
|
||||||
else
|
|
||||||
next()
|
|
||||||
|
|
||||||
apiRouter.get "/status", (req, res)->
|
apiRouter.get "/status", (req, res)->
|
||||||
res.send("web sharelatex is alive")
|
res.send("web sharelatex is alive")
|
||||||
|
|
Loading…
Reference in a new issue