-
-
Notifications
You must be signed in to change notification settings - Fork 186
Description
Hello! I’m having an issue with HAL Browser redirects from the matrix table.
I’m running Pact Broker via Docker Compose (Postgres + Pact Broker) behind Nginx, and I serve it under an additional path prefix: pact-broker-api/. I also set PACT_BROKER_BASE_URLS to include the prefixed URLs.
In the matrix table:
- Consumer version number link works
The “consumer version number” link is an absolute URL like this, and it works correctly:
https://<HOST>/pact-broker-api/hal-browser/browser.html#https://<HOST>/pact-broker-api/pacticipants/<PACTICIPANT>/versions/<VERSION>
- Tag link redirects incorrectly
The “tag” link is rendered as a relative path like this:
/hal-browser/browser.html#/pacticipants/<PACTICIPANT>/versions/<VERSION>/tags/<TAG>
When I click it, it redirects to:
https://<HOST>/hal-browser/browser.html#/pacticipants/<PACTICIPANT>/versions/<VERSION>/tags/<TAG>
Notice the missing pact-broker-api/ prefix.
Expected
https://<HOST>/pact-broker-api/hal-browser/browser.html#/pacticipants/<PACTICIPANT>/versions/<VERSION>/tags/<TAG>
Is there a recommended way to configure Pact Broker / Nginx so that these relative HAL Browser links include the path prefix?
I noticed in the code that different logic is used to build the consumer version link vs. the tag link—maybe the tag link is not using the configured base URL(s)?