Skip to content

Commit 2d7cbd8

Browse files
committed
Update comments some more
1 parent 25b5f9b commit 2d7cbd8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

agent/src/main/java/dev/aikido/agent/wrappers/spring/SpringWebfluxWrapper.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public static Object onEnter(
8585
cookieMap, query, req.getHeaders().toSingleValueMap()
8686
);
8787

88-
// If the request gets blocked (e.g. IP Blocking), write a response here :
88+
// If the request gets blocked (e.g. IP Blocking), write a response here :
8989
WebRequestCollector.Res zenResponse = WebRequestCollector.report(context);
9090
if (zenResponse != null && res != null) {
9191
// Write message :
@@ -104,6 +104,9 @@ public static void onExit(
104104
@Advice.Enter Object enterResult,
105105
@Advice.Return(readOnly = false) Mono<Void> returnValue
106106
) {
107+
// enterResult can be two things : Either the SkipOnWrapper or the ServerHttpResponse
108+
// ServerHttpResponse -> Extract status code.
109+
// SkipOnWrapper -> we blocked a request (e.g. IP Blocking), and are returning the value below
107110
if (enterResult instanceof SkipOnWrapper wrapper && wrapper.mono() != null) {
108111
returnValue = wrapper.mono();
109112
} else if (enterResult instanceof ServerHttpResponse res) {

0 commit comments

Comments
 (0)