File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
api/src/test/java/io/kafbat/ui/config/auth Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -100,16 +100,20 @@ public static synchronized void ensureStarted(boolean enableProxy) {
100100 if (enableProxy ) {
101101 System .setProperty ("http.proxyHost" , "localhost" );
102102 System .setProperty ("http.proxyPort" , String .valueOf (proxyServer .port ()));
103+ // Override default nonProxyHosts ("localhost|127.*|[::1]") to allow proxying localhost for tests
104+ System .setProperty ("http.nonProxyHosts" , "none" );
103105 } else {
104106 System .clearProperty ("http.proxyHost" );
105107 System .clearProperty ("http.proxyPort" );
108+ System .clearProperty ("http.nonProxyHosts" );
106109 }
107110 proxyEnabled = enableProxy ;
108111 }
109112
110113 public static void stopServers () {
111114 System .clearProperty ("http.proxyHost" );
112115 System .clearProperty ("http.proxyPort" );
116+ System .clearProperty ("http.nonProxyHosts" );
113117 if (proxyServer != null ) {
114118 proxyServer .stop ();
115119 proxyServer = null ;
You can’t perform that action at this time.
0 commit comments