Skip to content

Commit

Permalink
Allow https for auth rest url
Browse files Browse the repository at this point in the history
  • Loading branch information
paul-hansen committed Aug 21, 2024
1 parent 997eddf commit c5cc4c0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion crates/unftp-auth-rest/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,13 @@ impl Authenticator<DefaultUser> for RestAuthenticator {
.body(Body::from(body))
.map_err(|e| AuthenticationError::with_source("rest authenticator http client error", e))?;

let client = Client::new();
let https = hyper_rustls::HttpsConnectorBuilder::new()
.with_native_roots()
.https_or_http()
.enable_http1()
.build();

let client = Client::builder().build(https);

let resp = client
.request(req)
Expand Down

0 comments on commit c5cc4c0

Please sign in to comment.