Skip to content

Commit 8913aed

Browse files
committed
lint
1 parent 0926359 commit 8913aed

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

lib/hooks/app/network/ip_filtering.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def self.ip_filtering!(headers, endpoint_config, global_config, request_context,
5959
private_class_method def self.extract_client_ip(headers, ip_config)
6060
# Use configured header or default to X-Forwarded-For
6161
ip_header = ip_config[:ip_header] || DEFAULT_IP_HEADER
62-
62+
6363
# Case-insensitive header lookup
6464
headers.each do |key, value|
6565
if key.to_s.downcase == ip_header.downcase
@@ -68,7 +68,7 @@ def self.ip_filtering!(headers, endpoint_config, global_config, request_context,
6868
return client_ip unless client_ip.nil? || client_ip.empty?
6969
end
7070
end
71-
71+
7272
nil
7373
end
7474

@@ -109,4 +109,4 @@ def self.ip_filtering!(headers, endpoint_config, global_config, request_context,
109109
end
110110
end
111111
end
112-
end
112+
end

spec/acceptance/acceptance_tests.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -632,8 +632,8 @@ def expired_unix_timestamp(seconds_ago = 600)
632632

633633
it "uses custom IP header when configured" do
634634
payload = {}.to_json
635-
headers = {
636-
"Content-Type" => "application/json",
635+
headers = {
636+
"Content-Type" => "application/json",
637637
"X-Real-IP" => "10.0.0.1",
638638
"X-Forwarded-For" => "203.0.113.1"
639639
}
@@ -646,8 +646,8 @@ def expired_unix_timestamp(seconds_ago = 600)
646646

647647
it "blocks requests when custom IP header has disallowed IP" do
648648
payload = {}.to_json
649-
headers = {
650-
"Content-Type" => "application/json",
649+
headers = {
650+
"Content-Type" => "application/json",
651651
"X-Real-IP" => "203.0.113.1",
652652
"X-Forwarded-For" => "10.0.0.1"
653653
}

spec/unit/app/network/ip_filtering_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,4 +387,4 @@
387387
end
388388
end
389389
end
390-
end
390+
end

0 commit comments

Comments
 (0)