use of io.undertow.security.handlers.SinglePortConfidentialityHandler in project undertow by undertow-io.
the class SimpleConfidentialRedirectTestCase method setup.
@BeforeClass
public static void setup() throws IOException {
DefaultServer.startSSLServer();
HttpHandler current = new HttpHandler() {
@Override
public void handleRequest(final HttpServerExchange exchange) throws Exception {
exchange.getResponseHeaders().put(HttpString.tryFromString("scheme"), exchange.getRequestScheme());
exchange.getResponseHeaders().put(HttpString.tryFromString("uri"), exchange.getRequestURI());
exchange.endExchange();
}
};
current = new SinglePortConfidentialityHandler(current, DefaultServer.getHostSSLPort("default"));
DefaultServer.setRootHandler(current);
}
Aggregations