Skip to content

Commit

Permalink
feat: allow disable_ssl_verification to be configured via environment…
Browse files Browse the repository at this point in the history
  • Loading branch information
bethesque committed Oct 3, 2018
1 parent 8e5c434 commit 85e7164
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ Set the environment variable `PACT_BROKER_LOG_LEVEL` to one of `DEBUG`, `INFO`,

* PACT_BROKER_BASE_EQUALITY_ONLY_ON_CONTENT_THAT_AFFECTS_VERIFICATION_RESULTS - `true` by default, may be set to `false`.
* PACT_BROKER_ORDER_VERSIONS_BY_DATE - `true` by default, may be set to `false`.
* PACT_DISABLE_SSL_VERIFICATION - `false` by default, may be set to `true`.

## General Pact Broker configuration and usage

Expand Down
2 changes: 1 addition & 1 deletion pact_broker/config.ru
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ app = PactBroker::App.new do | config |
config.webhook_scheme_whitelist = dc.webhook_scheme_whitelist
config.base_equality_only_on_content_that_affects_verification_results = dc.base_equality_only_on_content_that_affects_verification_results
config.order_versions_by_date = dc.order_versions_by_date
config.disable_ssl_verification = dc.disable_ssl_verification
end

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


if use_basic_auth
use BasicAuth,
basic_auth_username,
Expand Down
4 changes: 4 additions & 0 deletions pact_broker/docker_configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ def base_equality_only_on_content_that_affects_verification_results
end
end

def disable_ssl_verification
env(:disable_ssl_verification) == 'true'
end

def order_versions_by_date
if env_populated?(:order_versions_by_date)
env(:order_versions_by_date) == 'true'
Expand Down

0 comments on commit 85e7164

Please sign in to comment.