diff options
Diffstat (limited to 'modules/context/repo.go')
-rw-r--r-- | modules/context/repo.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/modules/context/repo.go b/modules/context/repo.go index 1a0263a330..c363c36994 100644 --- a/modules/context/repo.go +++ b/modules/context/repo.go @@ -441,8 +441,10 @@ func RepoAssignment(ctx *Context) (cancel context.CancelFunc) { userName := ctx.Params(":username") repoName := ctx.Params(":reponame") repoName = strings.TrimSuffix(repoName, ".git") - repoName = strings.TrimSuffix(repoName, ".rss") - repoName = strings.TrimSuffix(repoName, ".atom") + if setting.EnableFeed { + repoName = strings.TrimSuffix(repoName, ".rss") + repoName = strings.TrimSuffix(repoName, ".atom") + } // Check if the user is the same as the repository owner if ctx.IsSigned && ctx.Doer.LowerName == strings.ToLower(userName) { |