File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -102,13 +102,23 @@ impl TryFrom<&AppConfig> for OidcConfig {
102102 let logout_uri = format ! ( "{site_prefix_trimmed}{SQLPAGE_LOGOUT_URI}" ) ;
103103
104104 for path in & mut protected_paths {
105+ // Ensure the path starts with "/"
106+ if !path. starts_with ( '/' ) {
107+ path. insert ( 0 , '/' ) ;
108+ }
109+ // Prefix with site_prefix_trimmed
105110 * path = format ! ( "{}{}" , site_prefix_trimmed, path) ;
106111 }
107112
108- for path in & mut public_paths{
113+ for path in & mut public_paths {
114+ // Ensure the path starts with "/"
115+ if !path. starts_with ( '/' ) {
116+ path. insert ( 0 , '/' ) ;
117+ }
118+ // Prefix with site_prefix_trimmed
109119 * path = format ! ( "{}{}" , site_prefix_trimmed, path) ;
110120 }
111-
121+
112122 Ok ( Self {
113123 issuer_url : issuer_url. clone ( ) ,
114124 client_id : config. oidc_client_id . clone ( ) ,
You can’t perform that action at this time.
0 commit comments