Skip to content

Commit 192339e

Browse files
committed
add config to proxy interceptor
so it can use decide whether to act on appsec
1 parent 2204940 commit 192339e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

bottlecap/src/proxy/interceptor.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
use crate::{
2+
appsec,
23
config::{aws::AwsConfig, Config},
34
lifecycle::invocation::processor::Processor as InvocationProcessor,
45
lwa, EXTENSION_HOST,
@@ -175,7 +176,7 @@ async fn invocation_next_proxy(
175176
}
176177

177178
// K9 / ASM
178-
if config.appsec_enabled || config.serverless_appsec_enabled {
179+
if appsec::is_enabled(&config) {
179180
// TODO: do something here
180181
}
181182

@@ -223,7 +224,7 @@ async fn invocation_response_proxy(
223224
}
224225

225226
// K9 / ASM
226-
if config.appsec_enabled || config.serverless_appsec_enabled {
227+
if appsec::is_enabled(&config) {
227228
// TODO: do something here
228229
}
229230

0 commit comments

Comments
 (0)