mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Copy header values so they can be modified by modules each request
This commit is contained in:
parent
8128200d55
commit
9dcc251017
1 changed files with 4 additions and 1 deletions
|
@ -146,7 +146,10 @@ module.exports = (app, webRouter, apiRouter)->
|
|||
next()
|
||||
|
||||
webRouter.use (req, res, next) ->
|
||||
res.locals.nav = Settings.nav
|
||||
# Clone the nav settings so they can be modified for each request
|
||||
res.locals.nav = {}
|
||||
for key, value of Settings.nav
|
||||
res.locals.nav[key] = _.clone(Settings.nav[key])
|
||||
res.locals.templates = Settings.templateLinks
|
||||
next()
|
||||
|
||||
|
|
Loading…
Reference in a new issue