Merge pull request #19584 from cmbaxter/feature/xff-avoid-dns-cmbaxter

!htt #19388 Removing use of InetAddress.getByName
This commit is contained in:
Konrad Malawski 2016-02-15 13:29:50 +01:00
commit 10d3af1478
13 changed files with 104 additions and 26 deletions

View file

@ -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"
}
}