https://pact.io logo
#pact-broker
Title
# pact-broker
p

Pavlo Sprogis

03/25/2022, 6:05 PM
speaking about webhooks, could somebody please share an example of whitelist to fix this error in the webhook logs:
Copy code
For security purposes, the response details are not logged. To enable response logging, configure the webhook_host_whitelist property.
I have tried
Copy code
PACT_BROKER_WEBHOOK_HOST_WHITELIST="gitlab.<companyname>.com  <companyname>.<http://slack.com|slack.com>"
m

Matt (pactflow.io / pact-js / pact-go)

03/26/2022, 8:39 AM
What are the examples of webhooks you have configured? If you look at your debug logs on the server you should be able to see more detail
b

Beth (pactflow.io/Pact Broker/pact-ruby)

03/28/2022, 2:39 AM
what you have looks correct
when the app starts up, what is the configuration printed out for that setting?
m

Matt (pactflow.io / pact-js / pact-go)

03/28/2022, 3:31 AM
One thing that was ambiguous to me looking at the doc Beth, was if the list of items should be comma delimited?
b

Beth (pactflow.io/Pact Broker/pact-ruby)

03/28/2022, 3:32 AM
no, space delimited.
it's just that there were multiple examples.
m

Matt (pactflow.io / pact-js / pact-go)

03/28/2022, 3:32 AM
Yeah, it’s not clear there when reading it
b

Beth (pactflow.io/Pact Broker/pact-ruby)

03/28/2022, 3:33 AM
I thought the same thing.
m

Matt (pactflow.io / pact-js / pact-go)

03/28/2022, 3:33 AM
A list of hosts, network ranges,…
should be
A space delimited list of hosts, …
b

Beth (pactflow.io/Pact Broker/pact-ruby)

03/28/2022, 3:33 AM
I'll see if I can make it clerer
👍 2
p

Pavlo Sprogis

03/28/2022, 7:34 AM
hi guys, thank you, space delimited whitelist works, I was thinking that if I update
PACT_BROKER_WEBHOOK_HOST_WHITELIST
variable inside pact-broker docker container (on the fly) it will re-read this setting. But looks like this configuration variable is read only during the start, so I restarted pact-broker and now I can see full logs with webhook fail reason in pact-broker UI
👍 1
b

Beth (pactflow.io/Pact Broker/pact-ruby)

03/31/2022, 1:14 AM
Environment variables aren't generally an "on the fly" thing. If you change an env var from outside the process, you typically have to restart the process that reads it.
it's only on the fly if you're inside the process - you can change your own env var, but not someone elses.