API: Fix redirect issue when configured to use a subpath (#21652)

* request uri will contain the subpath
This commit is contained in:
Brian Gann
2020-02-14 08:51:35 -05:00
committed by GitHub
parent 0cde7decd7
commit 0e2d874ecf
3 changed files with 40 additions and 4 deletions

View File

@@ -47,7 +47,7 @@ func notAuthorized(c *m.ReqContext) {
return
}
WriteCookie(c.Resp, "redirect_to", url.QueryEscape(setting.AppSubUrl+c.Req.RequestURI), 0, newCookieOptions)
WriteCookie(c.Resp, "redirect_to", url.QueryEscape(c.Req.RequestURI), 0, newCookieOptions)
c.Redirect(setting.AppSubUrl + "/login")
}