restore df7adaf0e0
← after fixing mount-point; fix query() parsing
This commit is contained in:
parent
f395c1046c
commit
d242e6df11
@ -390,10 +390,13 @@ macro_rules! url {
|
|||||||
$($custom_args = $custom_args,)*
|
$($custom_args = $custom_args,)*
|
||||||
);
|
);
|
||||||
let path = origin
|
let path = origin
|
||||||
.segments() // first segment is /custom_domain,
|
.segments()
|
||||||
.skip(2)// second is <domain>, drop both
|
.skip(1)// skip is <custom_domain> part
|
||||||
.map(|seg| format!("/{}", seg)).collect::<String>();
|
.map(|seg| format!("/{}", seg)).collect::<String>();
|
||||||
let query = origin.query().map(|q| format!("?{}", q)).unwrap_or_default();
|
let query = origin.query()
|
||||||
|
.filter(|q| !q.is_empty())
|
||||||
|
.map(|q| format!("?{}", q))
|
||||||
|
.unwrap_or_default();
|
||||||
format!("https://{}{}{}", &domain, path, query)
|
format!("https://{}{}{}", &domain, path, query)
|
||||||
} else {
|
} else {
|
||||||
$(
|
$(
|
||||||
|
Loading…
Reference in New Issue
Block a user