Skip to content

Commit f2a704c

Browse files
Update Asm Blocked Response (#681)
* use block config for block id * linting * Using existing block config * Update dd-trace-py version * update to ddtracepy v3.19.1
1 parent 49710e6 commit f2a704c

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

datadog_lambda/asm.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,9 @@ def get_asm_blocked_response(
223223
content = ""
224224
else:
225225
content_type = blocked.get("content-type", "application/json")
226-
content = http_utils._get_blocked_template(content_type)
226+
content = http_utils._get_blocked_template(
227+
content_type, blocked.get("block_id", "default")
228+
)
227229

228230
response = {
229231
"statusCode": blocked.get("status_code", 403),

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ classifiers = [
2929
python = ">=3.8.0,<4"
3030
datadog = ">=0.51.0,<1.0.0"
3131
wrapt = "^1.11.2"
32-
ddtrace = ">=3.16.2,<3.19.0"
32+
ddtrace = ">=3.19.1,<4"
3333
ujson = ">=5.9.0"
3434
botocore = { version = "^1.34.0", optional = true }
3535
requests = { version ="^2.22.0", optional = true }

0 commit comments

Comments
 (0)