UI redirect to 127.0.0.1 when localhost requested (#7236)
* JS redirect from localhost -> 127.0.0.1 * ui-no-validation for 127.0.0.1 * Update with tests
This commit is contained in:
@@ -567,7 +567,7 @@ impl Configuration {
|
||||
}
|
||||
|
||||
fn dapps_config(&self) -> DappsConfiguration {
|
||||
let dev_ui = if self.args.flag_ui_no_validation { vec![("localhost".to_owned(), 3000)] } else { vec![] };
|
||||
let dev_ui = if self.args.flag_ui_no_validation { vec![("127.0.0.1".to_owned(), 3000)] } else { vec![] };
|
||||
let ui_port = self.ui_port();
|
||||
|
||||
DappsConfiguration {
|
||||
@@ -1578,7 +1578,7 @@ mod tests {
|
||||
port: 8180,
|
||||
hosts: Some(vec![]),
|
||||
});
|
||||
assert_eq!(conf1.dapps_config().extra_embed_on, vec![("localhost".to_owned(), 3000)]);
|
||||
assert_eq!(conf1.dapps_config().extra_embed_on, vec![("127.0.0.1".to_owned(), 3000)]);
|
||||
assert_eq!(conf1.ws_config().unwrap().origins, None);
|
||||
assert_eq!(conf2.directories().signer, "signer".to_owned());
|
||||
assert_eq!(conf2.ui_config(), UiConfiguration {
|
||||
|
||||
Reference in New Issue
Block a user