summaryrefslogtreecommitdiffstats
path: root/api/context.go
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2016-10-12 06:51:57 -0700
committerJoram Wilander <jwawilander@gmail.com>2016-10-12 09:51:57 -0400
commitd4268cf0d86cee4d51fa1877ccf47b2a69b65cd4 (patch)
tree29cb721757995bff6a881dbee5db60ace9e9486b /api/context.go
parentd195eea07de0654fb716d856448d6f10a2a7a0ff (diff)
downloadchat-d4268cf0d86cee4d51fa1877ccf47b2a69b65cd4.tar.gz
chat-d4268cf0d86cee4d51fa1877ccf47b2a69b65cd4.tar.bz2
chat-d4268cf0d86cee4d51fa1877ccf47b2a69b65cd4.zip
Trim trailing slashes to prevent OAuth2 URI mismatch errors (#4204)
Closes https://gitlab.com/gitlab-org/gitlab-mattermost/issues/84
Diffstat (limited to 'api/context.go')
-rw-r--r--api/context.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/api/context.go b/api/context.go
index 81a2c021d..524ccf402 100644
--- a/api/context.go
+++ b/api/context.go
@@ -364,7 +364,7 @@ func (c *Context) SetTeamURLFromSession() {
}
func (c *Context) SetSiteURL(url string) {
- c.siteURL = url
+ c.siteURL = strings.TrimRight(url, "/")
}
func (c *Context) GetTeamURLFromTeam(team *model.Team) string {