Skip to content

Commit

Permalink
Remove fetch from AppSec::Response for getting status_code
Browse files Browse the repository at this point in the history
  • Loading branch information
y9v committed Nov 29, 2024
1 parent 482bf12 commit 01d150e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/datadog/appsec/response.rb
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def block_response(env, options)
body << content(content_type)

Response.new(
status: options.fetch('status_code', 403).to_i,
status: options['status_code']&.to_i || 403,
headers: { 'Content-Type' => content_type },
body: body,
)
Expand Down

0 comments on commit 01d150e

Please sign in to comment.