mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Merge pull request #986 from sharelatex/as-sign-in-from-v2-post
Remove POST /docs custom handler, now handled by redirects
This commit is contained in:
commit
f90dd1b49a
2 changed files with 1 additions and 7 deletions
|
@ -15,7 +15,7 @@ module.exports = RedirectManager =
|
|||
if typeof target is 'string'
|
||||
url = target
|
||||
else
|
||||
if req.method == "POST"
|
||||
if req.method != "GET"
|
||||
code = 307
|
||||
|
||||
if typeof target.url == "function"
|
||||
|
|
|
@ -331,12 +331,6 @@ module.exports = class Router
|
|||
AuthenticationController.httpAuth,
|
||||
CompileController.getFileFromClsiWithoutUser
|
||||
|
||||
# We want to redirect POST and GET to different locations, but this is
|
||||
# unsupported by RedirectManager. Therefore we redirect GETs with
|
||||
# RedirectManager and POSTs with this custom route
|
||||
publicApiRouter.post '/docs', (req, res, next) ->
|
||||
res.redirect(307, "#{Settings.overleaf.host}/docs")
|
||||
|
||||
webRouter.get '/teams', (req, res, next) ->
|
||||
# Match v1 behaviour - if the user is signed in, show their teams list
|
||||
# Otherwise show some information about teams
|
||||
|
|
Loading…
Reference in a new issue