Skip to content

Commit

Permalink
Reapply "Migrate away from our http-client fork, use upstream. (#3736)…
Browse files Browse the repository at this point in the history
…" (#3799)

This reverts commit 6028148.
  • Loading branch information
MangoIV committed Jan 23, 2024
1 parent 18a50b1 commit a8bf167
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions services/galley/src/Galley/External/LegalHoldService/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,16 @@ makeVerifiedRequest fpr url reqBuilder = do
mkMgr <- view extGetManager
mgr <- liftIO $ mkMgr [fpr]
makeVerifiedRequestWithManager mgr url reqBuilder

-- | NOTE: Use this function wisely - this creates a new manager _every_ time it is called.
-- We should really _only_ use it in `checkLegalHoldServiceStatus` for the time being because
-- this is where we check for signatures, etc. If we reuse the manager, we are likely to reuse
-- an existing connection which will _not_ cause the new public key to be verified.
makeVerifiedRequestFreshManager ::
Fingerprint Rsa ->
HttpsUrl ->
(Http.Request -> Http.Request) ->
App (Http.Response LC8.ByteString)
makeVerifiedRequestFreshManager fpr url reqBuilder = do
mgr <- liftIO $ initExtEnv [fpr]
makeVerifiedRequestWithManager mgr url reqBuilder

0 comments on commit a8bf167

Please sign in to comment.