From 0055cbd3651ebde0f8b6cc70c9c44de56dc38830 Mon Sep 17 00:00:00 2001
From: Martin van Beurden <chadoe@gmail.com>
Date: Sun, 14 Sep 2014 19:35:22 +0200
Subject: Allow Gogs to run from a suburl behind a reverse proxy. e.g.
 http://mydomain.com/gogs/

Conflicts:
	modules/setting/setting.go

Conflicts:
	templates/repo/release/list.tmpl
	templates/user/dashboard/dashboard.tmpl

Conflicts:
	routers/repo/setting.go
---
 models/action.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'models/action.go')

diff --git a/models/action.go b/models/action.go
index a6b22b161d..596f51aff2 100644
--- a/models/action.go
+++ b/models/action.go
@@ -137,7 +137,7 @@ func updateIssuesCommit(userId, repoId int64, repoUserName, repoName string, com
 				return err
 			}
 
-			url := fmt.Sprintf("/%s/%s/commit/%s", repoUserName, repoName, c.Sha1)
+			url := fmt.Sprintf("%s/%s/%s/commit/%s", setting.AppRootSubUrl, repoUserName, repoName, c.Sha1)
 			message := fmt.Sprintf(`<a href="%s">%s</a>`, url, c.Message)
 
 			if _, err = CreateComment(userId, issue.RepoId, issue.Id, 0, 0, COMMIT, message, nil); err != nil {
-- 
cgit v1.2.3