code: func AbsoluteURL(req *http.Request, relative string) string {
  	scheme := "http"
  	if req.URL != nil && req.URL.Scheme == "https" { // isHTTPS
  		scheme = "https"
  	}
  	xForwardProto := req.Header.Get("X-Forwarded-Proto")
  	if xForwardProto != "" {
  		scheme = xForwardProto
  	}
  	return fmt.Sprintf("%s://%s%s", scheme, req.Host, relative)
  }
docs: // AbsoluteURL prefixes a relative URL with absolute address