diff --git a/lib/web/apiserver.go b/lib/web/apiserver.go index e63035dfcd759..5d1ad02b5bb08 100644 --- a/lib/web/apiserver.go +++ b/lib/web/apiserver.go @@ -1226,7 +1226,7 @@ func (h *Handler) getUserContext(w http.ResponseWriter, r *http.Request, p httpr if err != nil { return nil, trace.Wrap(err) } - if !pingResp.LicenseExpiry.IsZero() { + if pingResp.LicenseExpiry != nil && !pingResp.LicenseExpiry.IsZero() { userContext.Cluster.LicenseExpiry = pingResp.LicenseExpiry }