shutl_resource 1.3.4 → 1.3.5
Sign up to get free protection for your applications and to get access to all the features.
@@ -39,14 +39,17 @@ module Faraday
|
|
39
39
|
end
|
40
40
|
|
41
41
|
def request_debug(env)
|
42
|
-
request_headers =
|
42
|
+
request_headers = obfuscate_auth env[:request_headers]
|
43
43
|
|
44
44
|
debug_message("Request", request_headers, env[:body])
|
45
45
|
end
|
46
46
|
|
47
|
-
def
|
47
|
+
def obfuscate_auth(headers)
|
48
48
|
headers.dup.tap do |h|
|
49
|
-
|
49
|
+
if auth = h["Authorization"]
|
50
|
+
#display first few and last few characters
|
51
|
+
h["Authorization"] = "#{auth[0..10]}****#{auth[-4..-1]}"
|
52
|
+
end
|
50
53
|
end
|
51
54
|
end
|
52
55
|
|