remove ? on empty query parameters

This commit is contained in:
Paul Zinselmeyer 2023-11-05 16:26:34 +01:00
parent 330e2b93f3
commit 9ec50ba251
Signed by: pfzetto
GPG key ID: 4EEF46A5B276E648

View file

@ -22,9 +22,10 @@ pub fn strip_oidc_from_path(base_url: Uri, uri: &Uri) -> Result<Uri, MiddlewareE
.map(|x| x.to_string())
.reduce(|acc, x| acc + "&" + &x)
})
.map(|x| "?" + x)
.unwrap_or_default();
PathAndQuery::from_maybe_shared(format!("{}?{}", path_and_query.path(), query))
PathAndQuery::from_maybe_shared(format!("{}{}", path_and_query.path(), query))
})
.transpose()?;