]> source.dussan.org Git - gitblit.git/commitdiff
Add support for specifying the `Proxy-Authorization` header for the PluginManager 28/228/1
authorJames Moger <james.moger@gitblit.com>
Wed, 3 Dec 2014 20:05:49 +0000 (15:05 -0500)
committerJames Moger <james.moger@gitblit.com>
Wed, 3 Dec 2014 20:05:49 +0000 (15:05 -0500)
src/main/distrib/data/defaults.properties
src/main/java/com/gitblit/manager/PluginManager.java

index 093dd8573f8252255d4b28d368e9eb457596b810..6fddf0b3ba809597fade027eb4e4f92c7f720635 100644 (file)
@@ -582,6 +582,11 @@ plugins.httpProxyHost =
 # SINCE 1.7.0
 plugins.httpProxyPort = 
 
+# The HTTP proxy authorization header for plugin manager.
+#
+# SINCE 1.7.0
+plugins.httpProxyAuthorization = 
+
 # Number of threads used to handle miscellaneous tasks in the background.
 #
 # SINCE 1.6.0
index a43cbdc84cad6a2e2665f33f2a8d7e241597d330..bc3be52ff17f6f0e2a780b8619824e7e2b448a3e 100644 (file)
@@ -589,7 +589,7 @@ public class PluginManager implements IPluginManager, PluginStateListener {
        protected Proxy getProxy(URL url) {
                String proxyHost = runtimeManager.getSettings().getString(Keys.plugins.httpProxyHost, "");
                String proxyPort = runtimeManager.getSettings().getString(Keys.plugins.httpProxyPort, "");
-               
+
                if (!StringUtils.isEmpty(proxyHost)  && !StringUtils.isEmpty(proxyPort)) {
                        return new Proxy(Proxy.Type.HTTP, new InetSocketAddress(proxyHost, Integer.parseInt(proxyPort)));
                } else {
@@ -598,7 +598,8 @@ public class PluginManager implements IPluginManager, PluginStateListener {
        }
 
        protected String getProxyAuthorization(URL url) {
-               return "";
+               String proxyAuth = runtimeManager.getSettings().getString(Keys.plugins.httpProxyAuthorization, "");
+               return proxyAuth;
        }
 
        /**