sunlabs.brazil.sunlabs
public class StunnelHandler extends Object implements Handler
[https] accept = 443 connect = 8080Will allow "https" connections on the standard port ssl (443) to access a Brazil server on port 8080. When using Brazil in this configuration without this handler, since Brazil talks to the gateway via "http", it will issue redirects to "http", which is the wrong protocol. This template looks at the origin ip address, and if it matches, changes the server protocol for this request, resulting in the client redirecting back through the gateway properly.
Properties:
Method Summary | |
---|---|
boolean | init(Server server, String prefix) |
boolean | respond(Request request)
If we are coming from the machine which is designated as our ssl
gateway, then we need to change the protocol to "https" and
remap the default port. |