mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2024-11-22 17:26:03 +03:00
[bugfix] use the landing page user directly (#956)
If set, the landing page user configuration value is used as a Gin context parameter, which seems incorrect, since a normal request isn't going to have a parameter named after an arbitrarily configured user. Instead, the user name should be used directly when building the redirect URL.
This commit is contained in:
parent
2311c8e96e
commit
ee6a0a1e15
1 changed files with 1 additions and 1 deletions
|
@ -32,7 +32,7 @@ func (m *Module) baseHandler(c *gin.Context) {
|
|||
|
||||
// if a landingPageUser is set in the config, redirect to that user's profile
|
||||
if landingPageUser := config.GetLandingPageUser(); landingPageUser != "" {
|
||||
c.Redirect(http.StatusFound, "/@"+c.Param(strings.ToLower(landingPageUser)))
|
||||
c.Redirect(http.StatusFound, "/@"+strings.ToLower(landingPageUser))
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue