Skip to content

Commit 44be914

Browse files
committed
Merge pull request #110 from jandillmann/master
Fix HTTP basic authentication header detection for cURL example
2 parents 539ebe4 + 152b1df commit 44be914

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: lib/rspec_api_documentation/curl.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def url
4141

4242
def headers
4343
filter_headers(super).map do |k, v|
44-
if k == "HTTP_AUTHORIZATION" && v =~ /^Basic/
44+
if k =~ /authorization/i && v =~ /^Basic/
4545
"\\\n\t-u #{format_auth_header(v)}"
4646
else
4747
"\\\n\t-H \"#{format_full_header(k, v)}\""

0 commit comments

Comments
 (0)