Can Wiremock work as HTTP <forward proxy>?
# help
p
Can Wiremock work as HTTP forward proxy?
my use case it that for some API calls wiremock should act as pass through and for some API calls it should intercept and return mocked response
the client makes API call like
Copy code
response = requests.get("<https://example.com/other/thing>", timeout=10, verify=False, proxies=proxies)
proxies
Copy code
proxies = {
  "http": os.getenv("HTTP_PROXY"),
  "https": os.getenv("HTTPS_PROXY"),
}
this is in python
I am mainly looking for https based API calls
from my experiments, I was able to achieve this behaviour for HTTP call but not for HTTPS.
my guess it that wiremock does not support http tunneling, correct me if I am wrong
okay, so finally I found that
"--enable-browser-proxying"
this flag was needed to make it work
👍 1
t
This is the right option. It supports HTTP and HTTPS. For the latter you’ll need to ensure you’ve handled the issues around certificate verification (either trusting WireMock’s cert or disabling validation in your client).