Skip to content

Commit ef2f082

Browse files
committed
Refactor OIDC redirect URL cookie name construction for improved efficiency
1 parent 10a895d commit ef2f082

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/webserver/oidc.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -783,11 +783,7 @@ fn create_nonce_cookie(nonce: &Nonce) -> Cookie<'_> {
783783
}
784784

785785
fn create_redirect_cookie<'a>(csrf_token: &CsrfToken, initial_url: &'a str) -> Cookie<'a> {
786-
let cookie_name = format!(
787-
"{}{}",
788-
SQLPAGE_REDIRECT_URL_COOKIE_PREFIX,
789-
csrf_token.secret()
790-
);
786+
let cookie_name = SQLPAGE_REDIRECT_URL_COOKIE_PREFIX.to_owned() + csrf_token.secret();
791787
Cookie::build(cookie_name, initial_url)
792788
.secure(true)
793789
.http_only(true)

0 commit comments

Comments
 (0)