bbyars / mountebank

Over the wire test doubles
http://www.mbtest.org
MIT License
2k stars 262 forks source link

How to configure mountebank to handle subdomains? #758

Closed noel-yap closed 6 months ago

noel-yap commented 6 months ago

https://stackoverflow.com/questions/78111215/how-to-configure-mountebank-to-handle-subdomains

I have a service calling a third-party service, say, example.com. Some of the calls are to www.example.com and others are to ftp.example.com.

As such, the Helm chart is configured with something like EXAMPLE_AUTHORITY: example.com which I'm hoping can be changed to EXAMPLE_AUTHORITY: mountebank.mydomain.com and the above calls would go to www.mountebank.mydomain.com and ftp.mountebank.mydomain.com, respectively.

I've configured mountebank to stub out example.com. How do I configure it so that calls to both www.mountebank.mydomain.com and ftp.mountebank.mydomain.com are handled appropriately?

Do I need separate imposters for each of the subdomains?