Hello! I'm seeing some behavior between pact and p...
# pact-ruby
p
Hello! I'm seeing some behavior between pact and pact-broker. We are deploying pact-broker behind a reverse proxy, and trying to mount the pact-broker in a rails application. Everything seems to work quite well, except when we try to publish contracts from internal services. We want end users to view the pact-broker UI from outside of the reverse proxy, but the publication/verification tasks are executed internally. For some reason, it seems as though the publication task is picking up the URL from the pact-broker configuration. Within a provider service, we are specifying
task.pact_broker_base_url = "<http://contract-testing/pact>"
within the
PactBroker::Client::PublicationTask
in the rake file. When I execute the publication task, it initially uses the correct URI for publication, but at some point it seems to swap that URL out for the
config.base_url = "<https://contract-testing.chm.life/pact>"
value specified in the pact-broker configuration. I inserted a break point to try and demonstrate (See attached). cc @Andy Jenness
And from the documentation for the config.base_url configuration variable, I think this is the correct setup. But I have tried swapping it out for the internal resource route. This allows the publication event to work, but now the JS on the broker UI is trying to access the incorrect URL!
It looks like this is the expected behavior. X-posted here with a little more context. https://pact-foundation.slack.com/archives/C9VPNUJR2/p1681253434689569