James Moger
2014-12-03 fbc7a7dd5fa61486610cf11c09e0007f2900a3e1
Add support for specifying the `Proxy-Authorization` header for the PluginManager
2 files modified
10 ■■■■ changed files
src/main/distrib/data/defaults.properties 5 ●●●●● patch | view | raw | blame | history
src/main/java/com/gitblit/manager/PluginManager.java 5 ●●●●● patch | view | raw | blame | history
src/main/distrib/data/defaults.properties
@@ -582,6 +582,11 @@
# 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
src/main/java/com/gitblit/manager/PluginManager.java
@@ -589,7 +589,7 @@
    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 @@
    }
    protected String getProxyAuthorization(URL url) {
        return "";
        String proxyAuth = runtimeManager.getSettings().getString(Keys.plugins.httpProxyAuthorization, "");
        return proxyAuth;
    }
    /**