Skip to content

Commit b5b0f00

Browse files
committed
Reduce diff
1 parent 1a3c8b6 commit b5b0f00

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

library/sources/http-server/createRequestListener.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,10 @@ function onFinishRequestHandler(
113113
agent.onRouteRateLimited(context.rateLimitedEndpoint);
114114
}
115115

116-
const attackWaveDetector = agent.getAttackWaveDetector();
117-
118116
if (
119117
context.remoteAddress &&
120118
!agent.getConfig().isBypassedIP(context.remoteAddress) &&
121-
attackWaveDetector.check(context)
119+
agent.getAttackWaveDetector().check(context)
122120
) {
123121
agent.onDetectedAttackWave({
124122
request: context,

library/sources/http-server/http2/createStreamListener.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,10 @@ function discoverRouteFromStream(
7676
agent.onRouteRateLimited(context.rateLimitedEndpoint);
7777
}
7878

79-
const attackWaveDetector = agent.getAttackWaveDetector();
80-
8179
if (
8280
context.remoteAddress &&
8381
!agent.getConfig().isBypassedIP(context.remoteAddress) &&
84-
attackWaveDetector.check(context)
82+
agent.getAttackWaveDetector().check(context)
8583
) {
8684
agent.onDetectedAttackWave({
8785
request: context,

0 commit comments

Comments
 (0)