public class HostCheckHandler
extends GzipHandler
Constructor | Description |
---|---|
HostCheckHandler(I2PAppContext ctx) |
MUST call setListenHosts() afterwards.
|
Modifier and Type | Method | Description |
---|---|---|
void |
handle(String pathInContext,
Request baseRequest,
HttpServletRequest httpRequest,
HttpServletResponse httpResponse) |
Block by Host header,
redirect HTTP to HTTPS,
pass everything else to the delegate.
|
void |
setListenHosts(Set<String> hosts) |
Set the legal hosts.
|
public HostCheckHandler(I2PAppContext ctx)
public void setListenHosts(Set<String> hosts)
hosts
- contains hostnames or IPs. But we allow all IPs anyway.public void handle(String pathInContext, Request baseRequest, HttpServletRequest httpRequest, HttpServletResponse httpResponse) throws IOException, ServletException
IOException
ServletException