File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
agent/src/main/java/dev/aikido/agent/wrappers/spring Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff 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 ) {
You can’t perform that action at this time.
0 commit comments