Skip to content

Commit

Permalink
listeners: remove timeout arg for roundtriper
Browse files Browse the repository at this point in the history
  • Loading branch information
Hellzy committed May 23, 2024
1 parent 89209f0 commit 23c17fb
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion internal/appsec/listener/graphqlsec/graphql.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func (l *wafEventListener) onEvent(request *types.RequestOperation, _ types.Requ
}

if _, ok := l.addresses[shared.ServerIoNetURLAddr]; ok {
shared.RegisterRoundTripper(request, wafCtx, l.limiter, l.config.WAFTimeout)
shared.RegisterRoundTripper(request, wafCtx, l.limiter)
}

// Add span tags notifying this trace is AppSec-enabled
Expand Down
2 changes: 1 addition & 1 deletion internal/appsec/listener/grpcsec/grpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ func (l *wafEventListener) onEvent(op *types.HandlerOperation, handlerArgs types
}

if _, ok := l.addresses[shared.ServerIoNetURLAddr]; ok {
shared.RegisterRoundTripper(op, wafCtx, l.limiter, l.config.WAFTimeout)
shared.RegisterRoundTripper(op, wafCtx, l.limiter)
}

// Listen to the UserID address if the WAF rules are using it
Expand Down
2 changes: 1 addition & 1 deletion internal/appsec/listener/httpsec/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ type wafEventListener struct {
once sync.Once
}

// newWAFEventListener returns the WAF event listener to register in order to enable it.
func newWafEventListener(wafHandle *waf.Handle, cfg *config.Config, limiter limiter.Limiter) *wafEventListener {
if wafHandle == nil {
log.Debug("appsec: no WAF Handle available, the HTTP WAF Event Listener will not be registered")
Expand All @@ -90,7 +91,6 @@ func newWafEventListener(wafHandle *waf.Handle, cfg *config.Config, limiter limi
}
}

// NewWAFEventListener returns the WAF event listener to register in order to enable it.
func (l *wafEventListener) onEvent(op *types.Operation, args types.HandlerOperationArgs) {
wafCtx, err := l.wafHandle.NewContextWithBudget(l.config.WAFTimeout)
if err != nil {
Expand Down

0 comments on commit 23c17fb

Please sign in to comment.