code: @Override
    public void makeInsecure(HttpServletRequest request, HttpServletResponse response) throws IOException {
      response.setStatus(HttpServletResponse.SC_MOVED_PERMANENTLY);
      response.setHeader("Location", insecureUrl(request, response));
      response.getOutputStream().flush();
      response.getOutputStream().close();
    }
docs: Sends a moved perminately redirect to the insecure form of the request URL.
  
  @request the request to make secure.
  @response the response for the request.