Skip to content

Commit ca50ae4

Browse files
committed
remove redundant logs
1 parent aa8a312 commit ca50ae4

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

apisix/plugins/ai-prompt-guard.lua

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,23 +81,19 @@ function _M.access(conf, ctx)
8181
if #conf.allow_patterns > 0 then
8282
local any_allowed = false
8383
for _, pattern in ipairs(conf.allow_patterns) do
84-
-- core.log.error("Checking pattern: ", pattern)
85-
-- core.log.error("Content to check: ", content_to_check)
8684
if ngx.re.find(content_to_check, pattern, "jou") then
8785
any_allowed = true
8886
break
8987
end
9088
end
9189
if not any_allowed then
92-
-- core.log.error("Request doesn't match allow patterns")
9390
return core.response.exit(400, {message = "Request doesn't match allow patterns"})
9491
end
9592
end
9693

9794
-- Deny patterns check
9895
for _, pattern in ipairs(conf.deny_patterns) do
9996
if ngx.re.find(content_to_check, pattern, "jou") then
100-
-- core.log.error("Request contains prohibited content")
10197
return core.response.exit(400, {message = "Request contains prohibited content"})
10298
end
10399
end

0 commit comments

Comments
 (0)