public void handleRequest(HttpServerExchange exchange) throws Exception {
exchange.getResponseHeaders().add(Headers.LOCATION, "https://" + exchange.getHostName() + ":" + (exchange.getHostPort() + 363) + exchange.getRelativePath());
exchange.setResponseCode(StatusCodes.TEMPORARY_REDIRECT);
}
}), "x-undertow-transport", ExchangeAttributes.transportProtocol())).build();
server.start();
}
private static KeyStore loadKeyStore(String name) throws Exception {
String storeLoc = System.getProperty(name);
final InputStream stream;