Skip to content

Instantly share code, notes, and snippets.

@MelissaKaulfuss
Created April 12, 2018 06:56
Show Gist options
  • Save MelissaKaulfuss/f1f78ada2beef9ad14dec0b791979455 to your computer and use it in GitHub Desktop.
Save MelissaKaulfuss/f1f78ada2beef9ad14dec0b791979455 to your computer and use it in GitHub Desktop.
Using Middleman Proxy with our Platform Docker containers

You can use mitmproxy which is an interactive HTTPS proxy.

  • Install it: brew install mitmproxy
  • In ted:
    • go to common-services.yml
    • find the relevant app_name-base ie. bookings-base, reservations-base
    • add HOOROO_PROXY: "http://middleman:8080"
  • Middleman is best viewed in Chrome.
  • The URL to view it in the browser is http://middleman.ted:8081
  • Run the Ted start script to restart the containers ./start
  • Spin up Postman, use the Epic in there to create your availability, make a booking etc.
  • View in Shari event viewer/mitmproxy to figure stuffs out.
  • If you want to do something with a particular event you can configure the proxy to stall a step:
    • In the section with the pause icon, add ~u customer-payments which will use regex to find the URL
    • It'll pause the action so you can do stuff like simulate a timeout, connection failure, mess with the response etc.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment