File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
src/main/java/io/gravitee/policy/ai/prompt/guard/rails Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -81,8 +81,9 @@ private CompletableSource checkContent(HttpPlainExecutionContext ctx) {
8181 .flatMapCompletable (classifierResults -> {
8282 var detectedContentTypes = detectClassifierResultContentTypes (classifierResults , sensitivityThreshold );
8383 if (
84- configuration .parseContentChecks ().isEmpty () ||
85- configuration .parseContentChecks ().stream ().anyMatch (detectedContentTypes ::contains )
84+ !detectedContentTypes .isEmpty () &&
85+ (configuration .parseContentChecks ().isEmpty () ||
86+ configuration .parseContentChecks ().stream ().anyMatch (detectedContentTypes ::contains ))
8687 ) {
8788 logMetrics (detectedContentTypes , ctx , configuration .requestPolicy ().getAction ());
8889 if (RequestPolicy .BLOCK_REQUEST .equals (configuration .requestPolicy ())) {
You can’t perform that action at this time.
0 commit comments