Fixing UI issues after UI server refactor (#5710)
* Self-sufficient secureApi. * Updating embed. * Linting issues.
This commit is contained in:
@@ -762,10 +762,6 @@ impl Configuration {
|
||||
}
|
||||
|
||||
fn ui_hosts(&self) -> Option<Vec<String>> {
|
||||
if self.args.flag_ui_no_validation {
|
||||
return None;
|
||||
}
|
||||
|
||||
self.hosts(&self.args.flag_ui_hosts, &self.ui_interface())
|
||||
}
|
||||
|
||||
@@ -774,6 +770,10 @@ impl Configuration {
|
||||
}
|
||||
|
||||
fn ws_hosts(&self) -> Option<Vec<String>> {
|
||||
if self.args.flag_ui_no_validation {
|
||||
return None;
|
||||
}
|
||||
|
||||
self.hosts(&self.args.flag_ws_hosts, &self.ws_interface())
|
||||
}
|
||||
|
||||
@@ -1486,13 +1486,15 @@ mod tests {
|
||||
port: 8180,
|
||||
hosts: Some(vec![]),
|
||||
});
|
||||
assert!(conf0.ws_config().unwrap().hosts.is_some());
|
||||
assert_eq!(conf1.directories().signer, "signer".to_owned());
|
||||
assert_eq!(conf1.ui_config(), UiConfiguration {
|
||||
enabled: true,
|
||||
interface: "127.0.0.1".into(),
|
||||
port: 8180,
|
||||
hosts: None,
|
||||
hosts: Some(vec![]),
|
||||
});
|
||||
assert_eq!(conf1.ws_config().unwrap().hosts, None);
|
||||
assert_eq!(conf2.directories().signer, "signer".to_owned());
|
||||
assert_eq!(conf2.ui_config(), UiConfiguration {
|
||||
enabled: true,
|
||||
@@ -1500,6 +1502,7 @@ mod tests {
|
||||
port: 3123,
|
||||
hosts: Some(vec![]),
|
||||
});
|
||||
assert!(conf2.ws_config().unwrap().hosts.is_some());
|
||||
assert_eq!(conf3.directories().signer, "signer".to_owned());
|
||||
assert_eq!(conf3.ui_config(), UiConfiguration {
|
||||
enabled: true,
|
||||
@@ -1507,6 +1510,7 @@ mod tests {
|
||||
port: 8180,
|
||||
hosts: Some(vec![]),
|
||||
});
|
||||
assert!(conf3.ws_config().unwrap().hosts.is_some());
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user