Skip to content

Commit 2b342d5

Browse files
committedMar 12, 2018
fix: correct code for allowing public access to heartbeat url
1 parent c9d5ee4 commit 2b342d5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

‎pact_broker/basic_auth.rb

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ def call(env)
2323
end
2424

2525
def use_basic_auth?(env)
26-
!(is_badge_path?(env) || is_heartbeat_and_public_access_allowed(env))
26+
!(is_badge_path?(env) || is_heartbeat_and_public_access_allowed?(env))
2727
end
2828

2929
def is_badge_path?(env)
3030
env[PATH_INFO] =~ BADGE_PATH
3131
end
3232

33-
def is_heartbeat_and_public_access_allowed?
34-
@allow_public_access_to_heartbeat && env[PATH_INFO] == BADGE_PATH
33+
def is_heartbeat_and_public_access_allowed?(env)
34+
@allow_public_access_to_heartbeat && env[PATH_INFO] == HEARTBEAT_PATH
3535
end
3636
end

0 commit comments

Comments
 (0)