From 9c7bb3d377a0637ff034be407cb9c03c606647a9 Mon Sep 17 00:00:00 2001
From: James Moger <james.moger@gitblit.com>
Date: Sun, 27 Oct 2013 11:05:11 -0400
Subject: [PATCH] Add setting to automatically redirect http requests to the https port

---
 src/main/distrib/data/gitblit.properties |   14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/src/main/distrib/data/gitblit.properties b/src/main/distrib/data/gitblit.properties
index 7c62c5a..41aa5a3 100644
--- a/src/main/distrib/data/gitblit.properties
+++ b/src/main/distrib/data/gitblit.properties
@@ -1545,6 +1545,16 @@
 # RESTART REQUIRED
 server.ajpPort = 0
 
+# Automatically redirect http requests to the secure https connector.
+#
+# This setting requires that you have configured server.httpPort and server.httpsPort.
+# Unless you are on a private LAN where you trust all client connections, it is
+# recommended to use https for all communications.
+#
+# SINCE 1.4.0
+# RESTART REQUIRED
+server.redirectToHttpsPort = true
+
 # Specify the interface for Jetty to bind the standard connector.
 # You may specify an ip or an empty value to bind to all interfaces.
 # Specifying localhost will result in Gitblit ONLY listening to requests to
@@ -1552,7 +1562,7 @@
 #
 # SINCE 0.5.0
 # RESTART REQUIRED
-server.httpBindInterface = localhost
+server.httpBindInterface =
 
 # Specify the interface for Jetty to bind the secure connector.
 # You may specify an ip or an empty value to bind to all interfaces.
@@ -1561,7 +1571,7 @@
 #
 # SINCE 0.5.0
 # RESTART REQUIRED
-server.httpsBindInterface = localhost
+server.httpsBindInterface =
 
 # Specify the interface for Jetty to bind the AJP connector.
 # You may specify an ip or an empty value to bind to all interfaces.

--
Gitblit v1.9.1