Skip to content

Commit

Permalink
cookies (kanidm#2426)
Browse files Browse the repository at this point in the history
  • Loading branch information
Firstyear authored Jan 12, 2024
1 parent a1fa59b commit 3b0b350
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions libs/client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ doctest = false
[dependencies]
tracing = { workspace = true }
reqwest = { workspace = true, default-features = false, features = [
"cookies",
"multipart",
] }
kanidm_proto = { workspace = true }
Expand Down
3 changes: 3 additions & 0 deletions libs/client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,9 @@ impl KanidmClientBuilder {

let client_builder = reqwest::Client::builder()
.user_agent(KanidmClientBuilder::user_agent())
// We don't directly use cookies, but it may be required for load balancers that
// implement sticky sessions with cookies.
.cookie_store(true)
.danger_accept_invalid_hostnames(!self.verify_hostnames)
.danger_accept_invalid_certs(!self.verify_ca);

Expand Down

0 comments on commit 3b0b350

Please sign in to comment.