Skip to content

Commit fa0cb12

Browse files
authored
Make grape match (#220)
1 parent 324c134 commit fa0cb12

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@
1111
- Add Excon HTTP client support with middleware (based on contribution by @stiak in PR #154)
1212
- Add Typhoeus HTTP client support (adapted from work by @liaden)
1313

14+
## Bug Fixes
15+
16+
- Fix SHA256 content hash header lookup for Rack driver (PR #211 by @taylorthurlow)
17+
- Fix SHA256 content hash header lookup for Grape driver to check all header variations
18+
1419
## Improvements
1520

1621
- Update minimum Ruby version to 3.2
@@ -25,6 +30,7 @@
2530
- RSpec ~> 3.13
2631
- Rake ~> 13.0
2732
- Rest-Client ~> 2.1
33+
- Typhoeus ~> 1.4
2834

2935
# 2.6.0 (2025-01-18)
3036

lib/api_auth/request_drivers/grape_request.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,12 @@ def content_type
4949
end
5050

5151
def content_hash
52-
find_header %w[HTTP_X_AUTHORIZATION_CONTENT_SHA256]
52+
find_header %w[
53+
HTTP_X_AUTHORIZATION_CONTENT_SHA256
54+
X_AUTHORIZATION_CONTENT_SHA256
55+
HTTP-X-AUTHORIZATION-CONTENT-SHA256
56+
X-AUTHORIZATION-CONTENT-SHA256
57+
]
5358
end
5459

5560
def original_uri

0 commit comments

Comments
 (0)