From 14cbbeaf61ce67c1ef5a6445515f3134dd5690ce Mon Sep 17 00:00:00 2001
From: James Moger <james.moger@gitblit.com>
Date: Mon, 30 Dec 2013 16:53:58 -0500
Subject: [PATCH] New canonical base url setting for repository urls and notifications

---
 src/main/java/com/gitblit/servlet/SyndicationServlet.java |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/src/main/java/com/gitblit/servlet/SyndicationServlet.java b/src/main/java/com/gitblit/servlet/SyndicationServlet.java
index 8acd019..66ca4a1 100644
--- a/src/main/java/com/gitblit/servlet/SyndicationServlet.java
+++ b/src/main/java/com/gitblit/servlet/SyndicationServlet.java
@@ -222,7 +222,10 @@
 			// parameterized parameters
 			urlPattern = "{0}/commit/?r={1}&h={2}";
 		}
-		String gitblitUrl = HttpUtils.getGitblitURL(request);
+		String gitblitUrl = settings.getString(Keys.web.canonicalUrl, null);
+		if (StringUtils.isEmpty(gitblitUrl)) {
+			gitblitUrl = HttpUtils.getGitblitURL(request);
+		}
 		char fsc = settings.getChar(Keys.web.forwardSlashCharacter, '/');
 
 		List<FeedEntryModel> entries = new ArrayList<FeedEntryModel>();

--
Gitblit v1.9.1