Skip to content
This repository was archived by the owner on Apr 20, 2024. It is now read-only.

Commit d230b45

Browse files
committed
Fixed issue that caused test to fail
1 parent 8a66c39 commit d230b45

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Tests/GatekeeperTests/GatekeeperTests.swift

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,14 +158,18 @@ extension GatekeeperTests {
158158
}
159159

160160
func getHTTPRequest() -> Request {
161-
return try! Request(method: .get, uri: "http://localhost:8080/")
161+
return Request(method: .get, uri: "http://localhost:8080/")
162162
}
163163

164164
func getHTTPSRequest() -> Request {
165+
166+
var headers = [HeaderKey: String]()
167+
headers["X-Forwarded-For"] = "192.168.1.2"
168+
165169
return try! Request(
166170
method: .get,
167171
uri: URI("https://localhost:8080/"),
168-
peerAddress: PeerAddress(stream: "192.168.1.2")
172+
headers: headers
169173
)
170174
}
171175
}

0 commit comments

Comments
 (0)