File tree Expand file tree Collapse file tree
agent/src/main/java/com/cloud/agent/resource/consoleproxy
server/src/main/java/com/cloud/consoleproxy
services/console-proxy/server/src/main/java/com/cloud/consoleproxy Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -358,6 +358,8 @@ protected void runInContext() {
358358 Class <?> consoleProxyClazz = Class .forName ("com.cloud.consoleproxy.ConsoleProxy" );
359359 Method methodSetup = consoleProxyClazz .getMethod ("setEncryptorPassword" , String .class );
360360 methodSetup .invoke (null , encryptorPassword );
361+ methodSetup = consoleProxyClazz .getMethod ("setIsSourceIpCheckEnabled" , Boolean .class );
362+ methodSetup .invoke (null , isSourceIpCheckEnabled );
361363 } catch (SecurityException e ) {
362364 s_logger .error ("Unable to launch console proxy due to SecurityException" , e );
363365 System .exit (ExitStatus .Error .value ());
Original file line number Diff line number Diff line change @@ -208,7 +208,7 @@ public void startAgentHttpHandlerInVM(StartupProxyCommand startupCmd) {
208208
209209 cmd = new StartConsoleProxyAgentHttpHandlerCommand (ksBits , storePassword );
210210 cmd .setEncryptorPassword (getEncryptorPassword ());
211- cmd .setIsSourceIpCheckEnabled (ConsoleProxyManager .NoVncConsoleSourceIpCheckEnabled .value ( ));
211+ cmd .setIsSourceIpCheckEnabled (Boolean . parseBoolean ( _configDao . getValue ( ConsoleProxyManager .NoVncConsoleSourceIpCheckEnabled .key ()) ));
212212
213213 HostVO consoleProxyHost = findConsoleProxyHost (startupCmd );
214214
Original file line number Diff line number Diff line change @@ -528,6 +528,10 @@ public static void setEncryptorPassword(String password) {
528528 encryptorPassword = password ;
529529 }
530530
531+ public static void setIsSourceIpCheckEnabled (Boolean isEnabled ) {
532+ isSourceIpCheckEnabled = isEnabled ;
533+ }
534+
531535 static class ThreadExecutor implements Executor {
532536 @ Override
533537 public void execute (Runnable r ) {
You can’t perform that action at this time.
0 commit comments