diff --git a/kotsadm/pkg/handlers/troubleshoot.go b/kotsadm/pkg/handlers/troubleshoot.go index ef176765ce..6a9100af2d 100644 --- a/kotsadm/pkg/handlers/troubleshoot.go +++ b/kotsadm/pkg/handlers/troubleshoot.go @@ -239,6 +239,14 @@ func DownloadSupportBundle(w http.ResponseWriter, r *http.Request) { } func UploadSupportBundle(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Access-Control-Allow-Origin", "*") + w.Header().Set("Access-Control-Allow-Headers", "content-type, origin, accept, authorization") + + if r.Method == "OPTIONS" { + w.WriteHeader(200) + return + } + bundleContents, err := ioutil.ReadAll(r.Body) if err != nil { logger.Error(err)