Browse Source
improve sso callback path (#6676)
* normalize base_url for sso_callback_path
* clean url when embedding images
pull/6388/head^2
Stefan Melmuk
4 days ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
6 additions and
2 deletions
-
src/config.rs
|
|
@ -1325,12 +1325,16 @@ fn generate_smtp_img_src(embed_images: bool, domain: &str) -> String { |
|
|
if embed_images { |
|
|
if embed_images { |
|
|
"cid:".to_string() |
|
|
"cid:".to_string() |
|
|
} else { |
|
|
} else { |
|
|
format!("{domain}/vw_static/") |
|
|
// normalize base_url
|
|
|
|
|
|
let base_url = domain.trim_end_matches('/'); |
|
|
|
|
|
format!("{base_url}/vw_static/") |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
fn generate_sso_callback_path(domain: &str) -> String { |
|
|
fn generate_sso_callback_path(domain: &str) -> String { |
|
|
format!("{domain}/identity/connect/oidc-signin") |
|
|
// normalize base_url
|
|
|
|
|
|
let base_url = domain.trim_end_matches('/'); |
|
|
|
|
|
format!("{base_url}/identity/connect/oidc-signin") |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/// Generate the correct URL for the icon service.
|
|
|
/// Generate the correct URL for the icon service.
|
|
|
|