speaking about webhooks, could somebody please sha...
# pact-broker
p
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
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
what you have looks correct
when the app starts up, what is the configuration printed out for that setting?
m
One thing that was ambiguous to me looking at the doc Beth, was if the list of items should be comma delimited?
b
no, space delimited.
it's just that there were multiple examples.
m
Yeah, it’s not clear there when reading it
b
I thought the same thing.
m
A list of hosts, network ranges,…
should be
A space delimited list of hosts, …
b
I'll see if I can make it clerer
👍 2
p
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
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.