diff options
author | 无闻 <joe2010xtmf@163.com> | 2014-09-19 19:02:40 -0400 |
---|---|---|
committer | 无闻 <joe2010xtmf@163.com> | 2014-09-19 19:02:40 -0400 |
commit | 6a7bd097fe2b3e894830fc3fdb60dde5594b61d6 (patch) | |
tree | 64a9ea617ba1f704139881c3960fa2425dad9018 /routers/repo/commit.go | |
parent | 4f74b4e6578be4251af65cd08daa37c884e431a0 (diff) | |
parent | 0055cbd3651ebde0f8b6cc70c9c44de56dc38830 (diff) |
Merge pull request #463 from chadoe/urlroot
Allow Gogs to run from a suburl behind a reverse proxy.
Diffstat (limited to 'routers/repo/commit.go')
-rw-r--r-- | routers/repo/commit.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/routers/repo/commit.go b/routers/repo/commit.go index f7feb4d9..e58b9e78 100644 --- a/routers/repo/commit.go +++ b/routers/repo/commit.go @@ -159,8 +159,8 @@ func Diff(ctx *middleware.Context) { ctx.Data["Diff"] = diff ctx.Data["Parents"] = parents ctx.Data["DiffNotAvailable"] = diff.NumFiles() == 0 - ctx.Data["SourcePath"] = "/" + path.Join(userName, repoName, "src", commitId) - ctx.Data["RawPath"] = "/" + path.Join(userName, repoName, "raw", commitId) + ctx.Data["SourcePath"] = setting.AppRootSubUrl + "/" + path.Join(userName, repoName, "src", commitId) + ctx.Data["RawPath"] = setting.AppRootSubUrl + "/" + path.Join(userName, repoName, "raw", commitId) ctx.HTML(200, DIFF) } |