Skip to content

Commit 61ece3f

Browse files
GrantBirkiCopilot
andauthored
Apply suggestion from @Copilot
Co-authored-by: Copilot <[email protected]>
1 parent 770dab5 commit 61ece3f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/hooks/app/helpers.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def enforce_request_limits(config)
4848
# @return [Hash, String] Parsed JSON as Hash (optionally symbolized), or raw body if not JSON
4949
def parse_payload(raw_body, headers, symbolize: true)
5050
# Optimized content type check - check most common header first
51-
content_type = headers["Content-Type"] || headers["CONTENT_TYPE"] || headers["content-type"]
51+
content_type = headers["Content-Type"] || headers["CONTENT_TYPE"] || headers["content-type"] || headers["HTTP_CONTENT_TYPE"]
5252

5353
# Try to parse as JSON if content type suggests it or if it looks like JSON
5454
if content_type&.include?("application/json") || (raw_body.strip.start_with?("{", "[") rescue false)

0 commit comments

Comments
 (0)