mirror of
https://github.com/warp-tech/warpgate.git
synced 2025-09-06 22:55:24 +08:00
Update config.rs
This commit is contained in:
parent
3e12cdb84a
commit
b51b02db3b
1 changed files with 7 additions and 8 deletions
|
@ -155,14 +155,13 @@ impl SsoInternalProviderConfig {
|
||||||
}
|
}
|
||||||
SsoInternalProviderConfig::Custom { issuer_url, .. } => {
|
SsoInternalProviderConfig::Custom { issuer_url, .. } => {
|
||||||
let mut url = issuer_url.url().clone();
|
let mut url = issuer_url.url().clone();
|
||||||
let path = url.path().to_owned();
|
let path = url.path();
|
||||||
if let Some(path) = path.strip_suffix("/.well-known/openid-configuration") {
|
let path = path
|
||||||
url.set_path(path);
|
.strip_suffix(".well-known/openid-configuration")
|
||||||
let url_string = url.to_string();
|
.unwrap_or(path)
|
||||||
IssuerUrl::new(url_string.trim_end_matches('/').into())?
|
.to_owned();
|
||||||
} else {
|
url.set_path(&path);
|
||||||
issuer_url.clone()
|
IssuerUrl::from_url(url)
|
||||||
}
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue