Skip to content

Commit

Permalink
Fix the schema check for setting cookie securely
Browse files Browse the repository at this point in the history
  • Loading branch information
amirRamirfatahi committed Oct 2, 2024
1 parent 12f0ec3 commit 5fa818b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pubky-homeserver/src/routes/auth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ pub async fn signin(
let mut cookie = Cookie::new(public_key.to_string(), session_secret);

cookie.set_path("/");
if *uri.scheme().unwrap_or(&Scheme::HTTP) == Scheme::HTTPS {
if state.config.domain().is_some() {
cookie.set_secure(true);
cookie.set_same_site(SameSite::None);
}
Expand Down

0 comments on commit 5fa818b

Please sign in to comment.