Merge pull request #19584 from cmbaxter/feature/xff-avoid-dns-cmbaxter
!htt #19388 Removing use of InetAddress.getByName
This commit is contained in:
commit
10d3af1478
13 changed files with 104 additions and 26 deletions
|
|
@ -8,6 +8,7 @@ import akka.http.scaladsl.model._
|
|||
import akka.http.scaladsl.server._
|
||||
import headers._
|
||||
import docs.http.scaladsl.server.RoutingSpec
|
||||
import java.net.InetAddress
|
||||
|
||||
class MiscDirectivesExamplesSpec extends RoutingSpec {
|
||||
|
||||
|
|
@ -17,7 +18,7 @@ class MiscDirectivesExamplesSpec extends RoutingSpec {
|
|||
}
|
||||
|
||||
// tests:
|
||||
Get("/").withHeaders(`Remote-Address`(RemoteAddress("192.168.3.12"))) ~> route ~> check {
|
||||
Get("/").withHeaders(`Remote-Address`(RemoteAddress(InetAddress.getByName("192.168.3.12")))) ~> route ~> check {
|
||||
responseAs[String] shouldEqual "Client's ip is 192.168.3.12"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue