public class SSLHandler extends Object implements Route.Before
Router.setTrustProxy(boolean)
option.Constructor and Description |
---|
SSLHandler()
Creates a SSLHandler and redirect non-HTTPs requests to the HTTPS version of this call.
|
SSLHandler(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)
Router.setTrustProxy(boolean)
option.host
- Host to redirect.port
- HTTP port.public SSLHandler(@Nonnull String host)
Router.setTrustProxy(boolean)
option.host
- Host to redirect.public SSLHandler(int port)
Host
header or X-Forwarded-Host
.
If you run behind a reverse proxy that has been configured to send the X-Forwarded-* header,
please consider to set Router.setTrustProxy(boolean)
option.port
- HTTPS port.public SSLHandler()
Host
header.
If you run behind a reverse proxy that has been configured to send the X-Forwarded-* header,
please consider to set Router.setTrustProxy(boolean)
option.public void apply(@Nonnull Context ctx)
Route.Before
apply
in interface Route.Before
ctx
- Web context.Copyright © 2023. All rights reserved.