Skip to content

Commit

Permalink
fix uploading a support bundle
Browse files Browse the repository at this point in the history
  • Loading branch information
sgalsaleh committed Jul 28, 2020
1 parent d64c457 commit 5fb3e89
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions kotsadm/pkg/handlers/troubleshoot.go
Expand Up @@ -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)
Expand Down

0 comments on commit 5fb3e89

Please sign in to comment.