func (hr HTTPRedirect) ServeHTTP(rw http.ResponseWriter, req *http.Request) {
	if hr.RedirectScheme != "" {
		req.URL.Scheme = hr.RedirectScheme
	} else {
		req.URL.Scheme = webutil.SchemeHTTPS
	}
	if hr.RedirectHost != "" {
		req.URL.Host = hr.RedirectHost
	}
	if req.URL.Host == "" {
		req.URL.Host = req.Host
	}
	http.Redirect(rw, req, req.URL.String(), http.StatusMovedPermanently)
}
// ServeHTTP redirects HTTP to HTTPS
ServeHTTP redirects HTTP to HTTPS
// ServeHTTP redirects HTTP to HTTPS
func (hr HTTPRedirect) ServeHTTP(rw http.ResponseWriter, req *http.Request) {
	if hr.RedirectScheme != "" {
		req.URL.Scheme = hr.RedirectScheme
	} else {
		req.URL.Scheme = webutil.SchemeHTTPS
	}
	if hr.RedirectHost != "" {
		req.URL.Host = hr.RedirectHost
	}
	if req.URL.Host == "" {
		req.URL.Host = req.Host
	}
	http.Redirect(rw, req, req.URL.String(), http.StatusMovedPermanently)
}
func ( hr HTTPRedirect ) ServeHTTP ( rw http . ResponseWriter , req * http . Request ) { if hr . RedirectScheme != " " { req . URL . Scheme = hr . RedirectScheme } else { req . URL . Scheme = webutil . SchemeHTTPS } if hr . RedirectHost != " " { req . URL . Host = hr . RedirectHost } if req . URL . Host == " " { req . URL . Host = req . Host } http . Redirect ( rw , req , req . URL . String ( ) , http . StatusMovedPermanently ) }
ServeHTTP redirects HTTP to HTTPS
ServeHTTP redirects HTTP to HTTPS