diff --git a/servers/genericserver.js b/servers/genericserver.js index e55950e..9375add 100644 --- a/servers/genericserver.js +++ b/servers/genericserver.js @@ -52,14 +52,24 @@ class GenericServer { buildURL ( ) { - if ( ! this._settings ) - this._settings = Preferences.getAccountSettings ( this._server ); +// if ( ! this._settings ) + this._settings = Preferences.getAccountSettings ( this._server ); - this.type = this._settings.get_string ( "type" ); - this.username = this._settings.get_string ( "username" ); - this.name = this._settings.get_string ( "name" ); - this.password = this._settings.get_string ( "password" ); - this.urlcgi = this._settings.get_string ( "urlcgi" ); + if ( this.type != this._settings.get_string ( "type" ) || + this.username != this._settings.get_string ( "username" ) || + this.strict_ssl != this._settings.get_boolean ( "strict-ssl" ) || + this.name != this._settings.get_string ( "name" ) || + this.password != this._settings.get_string ( "password" ) || + this.urlcgi != this._settings.get_string ( "urlcgi" ) ) + { + this.type = this._settings.get_string ( "type" ); + this.username = this._settings.get_string ( "username" ); + this.strict_ssl = this._settings.get_boolean ( "strict-ssl" ); + this.name = this._settings.get_string ( "name" ); + this.password = this._settings.get_string ( "password" ); + this.urlcgi = this._settings.get_string ( "urlcgi" ); + this._httpSession = null; + } // log ( 'monito server >>> ' + this._server ); // log ( 'monito name >>> ' + this.name ); @@ -73,6 +83,7 @@ class GenericServer { { if ( this._httpSession == null ) { this._httpSession = new Soup.Session(); + this._httpSession.ssl_strict = this.strict_ssl; this._httpSession.user_agent = Me.metadata.uuid; } }