From 2b342d515fe5d3734708458fbbf41ff5537700a2 Mon Sep 17 00:00:00 2001 From: Beth Skurrie Date: Tue, 13 Mar 2018 10:40:19 +1100 Subject: [PATCH] fix: correct code for allowing public access to heartbeat url --- pact_broker/basic_auth.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pact_broker/basic_auth.rb b/pact_broker/basic_auth.rb index 672bbca5..8a5b57ba 100644 --- a/pact_broker/basic_auth.rb +++ b/pact_broker/basic_auth.rb @@ -23,14 +23,14 @@ def call(env) end def use_basic_auth?(env) - !(is_badge_path?(env) || is_heartbeat_and_public_access_allowed(env)) + !(is_badge_path?(env) || is_heartbeat_and_public_access_allowed?(env)) end def is_badge_path?(env) env[PATH_INFO] =~ BADGE_PATH end - def is_heartbeat_and_public_access_allowed? - @allow_public_access_to_heartbeat && env[PATH_INFO] == BADGE_PATH + def is_heartbeat_and_public_access_allowed?(env) + @allow_public_access_to_heartbeat && env[PATH_INFO] == HEARTBEAT_PATH end end