Skip to content

Commit 6338a02

Browse files
use block config for block id
1 parent 2551531 commit 6338a02

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

datadog_lambda/asm.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from copy import deepcopy
44
from typing import Any, Dict, List, Optional, Union
55

6+
from ddtrace.appsec._utils import Block_config
67
from ddtrace.contrib.internal.trace_utils import _get_request_header_client_ip
78
from ddtrace.internal import core
89
from ddtrace.internal.utils import get_blocked
@@ -223,7 +224,8 @@ def get_asm_blocked_response(
223224
content = ""
224225
else:
225226
content_type = blocked.get("content-type", "application/json")
226-
content = http_utils._get_blocked_template(content_type)
227+
blocked_config = Block_config()
228+
content = http_utils._get_blocked_template(content_type, blocked_config.block_id)
227229

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

0 commit comments

Comments
 (0)