Skip to content

Commit

Permalink
Merge pull request #2324 from overleaf/spd-devcsrf-resurrect
Browse files Browse the repository at this point in the history
Reinstate /dev/csrf route and add explanatory comment

GitOrigin-RevId: 48fe437040860e974ada4e22409762c74a14d394
  • Loading branch information
timothee-alby authored and sharelatex committed Nov 4, 2019
1 parent e9465e1 commit 33dc94d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions app/src/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -972,9 +972,8 @@ function initialize(webRouter, privateApiRouter, publicApiRouter) {
res.send('web sharelatex is alive (api)')
)

if (['development', 'test'].includes(process.env.NODE_ENV)) {
webRouter.get('/dev/csrf', (req, res) => res.send(res.locals.csrfToken))
}
// used by kubernetes health-check and acceptance tests
webRouter.get('/dev/csrf', (req, res) => res.send(res.locals.csrfToken))

publicApiRouter.get('/health_check', HealthCheckController.check)
privateApiRouter.get('/health_check', HealthCheckController.check)
Expand Down

0 comments on commit 33dc94d

Please sign in to comment.