mirror of
https://github.com/pfzetto/axum-oidc.git
synced 2024-11-23 20:12:49 +01:00
remove ? on empty query parameters
This commit is contained in:
parent
330e2b93f3
commit
9ec50ba251
1 changed files with 2 additions and 1 deletions
|
@ -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()?;
|
||||
|
||||
|
|
Loading…
Reference in a new issue