protected boolean isConfidential ( final HttpServerExchange exchange ) { ServletRequestContext src = exchange . getAttachment ( ServletRequestContext . ATTACHMENT_KEY ) ; if ( src != null ) { return src . getOriginalRequest ( ) . isSecure ( ) ; } return super . isConfidential ( exchange ) ; }
Use the HttpServerExchange supplied to check if this request is already sufficiently confidential .