Skip to content

Commit

Permalink
fix: correct code for allowing public access to heartbeat url
Browse files Browse the repository at this point in the history
  • Loading branch information
bethesque committed Mar 12, 2018
1 parent c9d5ee4 commit 2b342d5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pact_broker/basic_auth.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 2b342d5

Please sign in to comment.