diff --git a/kotsadm/pkg/handlers/troubleshoot.go b/kotsadm/pkg/handlers/troubleshoot.go index 9e9a600b44..dd4d7ddacf 100644 --- a/kotsadm/pkg/handlers/troubleshoot.go +++ b/kotsadm/pkg/handlers/troubleshoot.go @@ -313,6 +313,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)