public class SSLHandler extends Object implements Route.Before
Constructor and Description |
---|
SSLHandler(boolean useProxy)
Creates a SSLHandler and redirect non-HTTPs requests to the HTTPS version of this call.
|
SSLHandler(boolean useProxy,
int port)
Creates a SSLHandler and redirect non-HTTPs requests to the HTTPS version of this call.
|
SSLHandler(String host)
Creates a SSLHandler and redirect non-HTTPS request to the given host.
|
SSLHandler(String host,
int port)
Creates a SSLHandler and redirect non-HTTPS request to the given host and port.
|
Modifier and Type | Method and Description |
---|---|
void |
apply(Context ctx)
Execute application code before next handler.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
then, then
public SSLHandler(@Nonnull String host, int port)
host
- Host to redirect.port
- HTTP port.public SSLHandler(@Nonnull String host)
host
- Host to redirect.public SSLHandler(boolean useProxy, int port)
Host
header or X-Forwarded-Host
.useProxy
- True for trust/use the X-Forwarded-Host
. Otherwise, only the
Host
header is used it.port
- HTTPS port.public SSLHandler(boolean useProxy)
Host
header or X-Forwarded-Host
.useProxy
- True for trust/use the X-Forwarded-Host
. Otherwise, only the
Host
header is used it.public void apply(@Nonnull Context ctx)
Route.Before
apply
in interface Route.Before
ctx
- Web context.Copyright © 2019. All rights reserved.