mirror of
https://git.joinplu.me/Plume/Plume.git
synced 2024-11-25 21:11:01 +00:00
when building links, skip both, /custom_domain/ and <custom_domain>
This commit is contained in:
parent
768f126f1d
commit
df7adaf0e0
1 changed files with 4 additions and 1 deletions
|
@ -389,7 +389,10 @@ macro_rules! url {
|
|||
$($common_args = $common_args,)*
|
||||
$($custom_args = $custom_args,)*
|
||||
);
|
||||
let path = origin.segments().skip(1).map(|seg| format!("/{}", seg)).collect::<String>(); //first segment is domain, drop it
|
||||
let path = origin
|
||||
.segments() // first segment is /custom_domain,
|
||||
.skip(2)// second is <domain>, drop both
|
||||
.map(|seg| format!("/{}", seg)).collect::<String>();
|
||||
let query = origin.query().map(|q| format!("?{}", q)).unwrap_or_default();
|
||||
format!("https://{}{}{}", &domain, path, query)
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue