mirror of
https://github.com/pomerium/pomerium.git
synced 2025-08-02 00:10:45 +02:00
use tlsClientConfig instead of custom dialer (#3830)
* use tlsClientConfig instead of custom dialer * rm debug log
This commit is contained in:
parent
5252cbda23
commit
a49f86d023
6 changed files with 49 additions and 7 deletions
|
@ -81,9 +81,12 @@ func (fetcher *jwksKeyFetcher) FetchPublicKey(ctx context.Context) (*PublicKey,
|
|||
}
|
||||
|
||||
// NewKeyFetcher returns a new KeyFetcher which fetches keys using an in-memory HTTP cache.
|
||||
func NewKeyFetcher(endpoint string) KeyFetcher {
|
||||
func NewKeyFetcher(endpoint string, transport http.RoundTripper) KeyFetcher {
|
||||
return &jwksKeyFetcher{
|
||||
client: httpcache.NewMemoryCacheTransport().Client(),
|
||||
client: (&httpcache.Transport{
|
||||
Transport: transport,
|
||||
Cache: httpcache.NewMemoryCache(),
|
||||
}).Client(),
|
||||
endpoint: endpoint,
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue