Skip to content

Commit

Permalink
Do not override hostname using X-Forwarded-For
Browse files Browse the repository at this point in the history
Previously we used `X-Forwarded-For` header for extracting IP, however this
would override IP address, resulting in insconsistencies.
Now the IP is intact and expected to be processed in enrich as it should be.
  • Loading branch information
peel committed Dec 14, 2023
1 parent 4ea0142 commit d20d02c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ class Service[F[_]: Sync](

def extractIp(req: Request[F], spAnonymous: Option[String]): Option[String] =
spAnonymous match {
case None => req.from.map(_.toUriString)
case None => req.remoteAddr.map(_.toUriString)
case Some(_) => None
}

Expand Down

0 comments on commit d20d02c

Please sign in to comment.