Revert "revert to #7677 #7679" (#7715)

This reverts commit 568dc33a02.
This commit is contained in:
Tomasz Drwięga
2018-01-29 11:43:30 +01:00
committed by Marek Kotewicz
parent 53ec1141cf
commit 33b39f0725
20 changed files with 470 additions and 1482 deletions

View File

@@ -586,7 +586,12 @@ impl Configuration {
let mut extra_embed = dev_ui.clone();
match self.ui_hosts() {
// In case host validation is disabled allow all frame ancestors
None => extra_embed.push(("*".to_owned(), ui_port)),
None => {
// NOTE Chrome does not seem to support "*:<port>"
// we use `http(s)://*:<port>` instead.
extra_embed.push(("http://*".to_owned(), ui_port));
extra_embed.push(("https://*".to_owned(), ui_port));
},
Some(hosts) => extra_embed.extend(hosts.into_iter().filter_map(|host| {
let mut it = host.split(":");
let host = it.next();