What exactly are you testing? If it's a unit test, send a request to the handler with the desired IP address in the data structure.
If it's an integration test, spin up a server, and use the java library org.apache.http to hit the end points.
To spin up the server use the once
fixture. It looks similar to this
(use-fixtures :once
(fn [tests]
(before stuff) ;start server here
(tests)
(after stuff))) ;shut down server here
This is the org.apache.http documentation. This is the subpage you'll want to look at. Read about setting the Requests. You'll want to set the IP address in the header of a request and then send it. Baeldung shows examples of using org.apache.http in java. which you can translate into Clojure code