public class HttpsRedirector extends Object implements MuHandler
Sends any HTTP requests to the same HTTPS address at the supplied port and optionally enables Strict-Transport-Security (HSTS)
HttpsRedirectorBuilder
Modifier and Type | Class and Description |
---|---|
static class |
HttpsRedirector.Builder
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
boolean |
handle(MuRequest request,
MuResponse response)
Called when an HTTP request is made (unless a previous handler stopped handler processing)
|
static HttpsRedirectorBuilder |
toHttpsPort(int port)
Deprecated.
|
public boolean handle(MuRequest request, MuResponse response) throws Exception
MuHandler
handle
in interface MuHandler
request
- The HTTP request.response
- The HTTP response.false
to continue processing the next handler (for example if writing a filter or inspector); or true
to stop processing (normally done if this handler sent a response).Exception
- Any uncaught exceptions will result in a 500 error code being returned to the client with a simple message.@Deprecated public static HttpsRedirectorBuilder toHttpsPort(int port)
HttpsRedirectorBuilder.toHttpsPort(int)
port
- The port to redirect toCopyright © 2017–2019. All rights reserved.