mirror of
https://git.joinplu.me/Plume/Plume.git
synced 2024-11-22 11:31:01 +00:00
restore df7adaf0e0
← after fixing mount-point; fix query() parsing
This commit is contained in:
parent
f395c1046c
commit
d242e6df11
1 changed files with 6 additions and 3 deletions
|
@ -390,10 +390,13 @@ macro_rules! url {
|
|||
$($custom_args = $custom_args,)*
|
||||
);
|
||||
let path = origin
|
||||
.segments() // first segment is /custom_domain,
|
||||
.skip(2)// second is <domain>, drop both
|
||||
.segments()
|
||||
.skip(1)// skip is <custom_domain> part
|
||||
.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)
|
||||
} else {
|
||||
$(
|
||||
|
|
Loading…
Reference in a new issue