summaryrefslogtreecommitdiffstats
path: root/src/main/java/com/gitblit/manager/GitblitManager.java
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2013-11-29 20:06:09 -0500
committerJames Moger <james.moger@gitblit.com>2013-12-30 16:53:58 -0500
commit14cbbeaf61ce67c1ef5a6445515f3134dd5690ce (patch)
treec90f1e0bec0d65a4e54725b21caff52de5bc8a39 /src/main/java/com/gitblit/manager/GitblitManager.java
parentafaab55bf4f309382b55793db44033233dcfb64d (diff)
downloadgitblit-14cbbeaf61ce67c1ef5a6445515f3134dd5690ce.tar.gz
gitblit-14cbbeaf61ce67c1ef5a6445515f3134dd5690ce.zip
New canonical base url setting for repository urls and notifications
Change-Id: I86a1eb61c2351d1cf3f6b3becf00f2a36d5c8ed6
Diffstat (limited to 'src/main/java/com/gitblit/manager/GitblitManager.java')
-rw-r--r--src/main/java/com/gitblit/manager/GitblitManager.java6
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);