This is a Play Framework 2.5.x plugin to test the client's IP address against Project Honeypot database of suspicious IP addresses (e.g. spammers, email harvesters)
Just like any other Play Framework plugin. Do not forget to specify your Project Honeypot API key in the application configuration.
Then, install the filter. All the app responses will have X-HttpBL
header with e.g. spammer
or
searchengine:1
(ID means one of search engines Project Honeypot recognizes)
or none
(if this IP isn't listed), etc.
You may also check this information from your controllers:
HttpBLRequest(requestHeader)
this method returns Future[HttpBL.Response]
where HttpBL.Response
is
from HttpBL library.
- There is no caching. DNS resolver is very effective by its own.
- The request to Http:BL is fired asynchronously, so a controller code doesn't need to wait.
In SBT:
libararyDependencies += "com.osinka.play" %% "play-httpbl" % "2.0.0-SNAPSHOT"