Closed lipsumar closed 6 months ago
@pimterry sorry for the delay on signing the CLA, I needed approval. We're all set!
Thanks @lipsumar! Rebased & merged :+1:. I've renamed the option slightly here and gone for tlsInterceptOnly
to make it a bit clearer what this is doing.
I'll release this shortly as part of v3.11.0.
tlsInterceptOnly
makes a lot of sense, good call 👍 Thanks for your reactivity !
This PR adds an option
tlsIntercept
toMockttpHttpsOptions
. This option is the inverse of the existingtlsPassthrough
:tlsPassthrough
: intercept everything except hostnames in this listtlsIntercept
: intercept nothing except hostnames in this listBoth options can not be used at the same time.
This option allows
mockttp
to be less intrusive and to let most requests untouched, except for a specific list of hostnames. This helps keep some applications using certificate pinning working correctly.Related issue: #162
@pimterry let me know if you'd prefer more tests and/or if docs need to be adjusted.