Skip to content

Commit 85e7164

Browse files
committed
feat: allow disable_ssl_verification to be configured via environment variable
pact-foundation/pact_broker#240
1 parent 8e5c434 commit 85e7164

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ Set the environment variable `PACT_BROKER_LOG_LEVEL` to one of `DEBUG`, `INFO`,
7171

7272
* PACT_BROKER_BASE_EQUALITY_ONLY_ON_CONTENT_THAT_AFFECTS_VERIFICATION_RESULTS - `true` by default, may be set to `false`.
7373
* PACT_BROKER_ORDER_VERSIONS_BY_DATE - `true` by default, may be set to `false`.
74+
* PACT_DISABLE_SSL_VERIFICATION - `false` by default, may be set to `true`.
7475

7576
## General Pact Broker configuration and usage
7677

pact_broker/config.ru

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ app = PactBroker::App.new do | config |
1818
config.webhook_scheme_whitelist = dc.webhook_scheme_whitelist
1919
config.base_equality_only_on_content_that_affects_verification_results = dc.base_equality_only_on_content_that_affects_verification_results
2020
config.order_versions_by_date = dc.order_versions_by_date
21+
config.disable_ssl_verification = dc.disable_ssl_verification
2122
end
2223

2324
PactBroker.configuration.load_from_database!
@@ -33,7 +34,6 @@ basic_auth_read_only_password = ENV.fetch('PACT_BROKER_BASIC_AUTH_READ_ONLY_PASS
3334
use_basic_auth = basic_auth_username != '' && basic_auth_password != ''
3435
allow_public_access_to_heartbeat = ENV.fetch('PACT_BROKER_PUBLIC_HEARTBEAT', '') == 'true'
3536

36-
3737
if use_basic_auth
3838
use BasicAuth,
3939
basic_auth_username,

pact_broker/docker_configuration.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ def base_equality_only_on_content_that_affects_verification_results
3535
end
3636
end
3737

38+
def disable_ssl_verification
39+
env(:disable_ssl_verification) == 'true'
40+
end
41+
3842
def order_versions_by_date
3943
if env_populated?(:order_versions_by_date)
4044
env(:order_versions_by_date) == 'true'

0 commit comments

Comments
 (0)