Skip to content

Commit

Permalink
Merge pull request #869 from replicatedhq/fi-uploading-support-bundle
Browse files Browse the repository at this point in the history
fix uploading a support bundle
  • Loading branch information
sgalsaleh committed Jul 28, 2020
2 parents 4ce5c9e + 5fb3e89 commit fabbbbb
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions kotsadm/pkg/handlers/troubleshoot.go
Expand Up @@ -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)
Expand Down

0 comments on commit fabbbbb

Please sign in to comment.