Skip to content

Commit

Permalink
wip: fix unix socket error (crowdsecurity#2897)
Browse files Browse the repository at this point in the history
  • Loading branch information
LaurenceJJones authored Mar 14, 2024
1 parent a6b0e58 commit e9b0f3c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/appsec/request.go
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,10 @@ func NewParsedRequestFromRequest(r *http.Request, logger *logrus.Entry) (ParsedR
}

var remoteAddrNormalized string
if r.RemoteAddr == "@" {
r.RemoteAddr = "127.0.0.1:65535"
}
// TODO we need to implement forwrded headers
host, _, err := net.SplitHostPort(r.RemoteAddr)
if err != nil {
log.Errorf("Invalid appsec remote IP source %v: %s", r.RemoteAddr, err.Error())
Expand Down

0 comments on commit e9b0f3c

Please sign in to comment.