code: func (h *Handler) WithClusterAuth(fn ClusterHandler) httprouter.Handle {
  	return httplib.MakeHandler(func(w http.ResponseWriter, r *http.Request, p httprouter.Params) (interface{}, error) {
  		ctx, err := h.AuthenticateRequest(w, r, true)
  		if err != nil {
  			log.Info(err)
  			// clear session just in case if the authentication request is not valid
  			ClearSession(w)
  			return nil, trace.Wrap(err)
  		}
  		siteName := p.ByName("site")
  		if siteName == currentSiteShortcut {
  			res, err := h.cfg.ProxyClient.GetClusterName()
  			if err != nil {
  				log.Warn(err)
  				return nil, trace.Wrap(err)
  			}
  
  			siteName = res.GetClusterName()
  		}
  		site, err := h.cfg.Proxy.GetSite(siteName)
  		if err != nil {
  			log.Warn(err)
  			return nil, trace.Wrap(err)
  		}
  
  		return fn(w, r, p, ctx, site)
  	})
  }
docs: // WithClusterAuth ensures that request is authenticated and is issued for existing cluster