summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/main/distrib/data/defaults.properties5
-rw-r--r--src/main/java/com/gitblit/manager/PluginManager.java5
2 files changed, 8 insertions, 2 deletions
diff --git a/src/main/distrib/data/defaults.properties b/src/main/distrib/data/defaults.properties
index 093dd857..6fddf0b3 100644
--- a/src/main/distrib/data/defaults.properties
+++ b/src/main/distrib/data/defaults.properties
@@ -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
diff --git a/src/main/java/com/gitblit/manager/PluginManager.java b/src/main/java/com/gitblit/manager/PluginManager.java
index a43cbdc8..bc3be52f 100644
--- a/src/main/java/com/gitblit/manager/PluginManager.java
+++ b/src/main/java/com/gitblit/manager/PluginManager.java
@@ -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;
}
/**