diff options
Diffstat (limited to 'src/main/java/com/gitblit/manager/GitblitManager.java')
-rw-r--r-- | src/main/java/com/gitblit/manager/GitblitManager.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/com/gitblit/manager/GitblitManager.java b/src/main/java/com/gitblit/manager/GitblitManager.java index 75b258a5..7e788361 100644 --- a/src/main/java/com/gitblit/manager/GitblitManager.java +++ b/src/main/java/com/gitblit/manager/GitblitManager.java @@ -337,8 +337,12 @@ public class GitblitManager implements IGitblit { } protected String getRepositoryUrl(HttpServletRequest request, String username, RepositoryModel repository) { + String gitblitUrl = settings.getString(Keys.web.canonicalUrl, null); + if (StringUtils.isEmpty(gitblitUrl)) { + gitblitUrl = HttpUtils.getGitblitURL(request); + } StringBuilder sb = new StringBuilder(); - sb.append(HttpUtils.getGitblitURL(request)); + sb.append(gitblitUrl); sb.append(Constants.R_PATH); sb.append(repository.name); |