Skip to content

Commit

Permalink
Accept Content-Type text/yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
cavokz committed Apr 21, 2023
1 parent 6151305 commit 66917be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/internal/utils/endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func DecodeRequestBody(w http.ResponseWriter, req *http.Request, data any, known
}

switch content_type[0] {
case "application/yaml":
case "application/yaml", "text/yaml":
dec := yaml.NewDecoder(req.Body)
dec.KnownFields(knownFields)
err := dec.Decode(data)
Expand Down

0 comments on commit 66917be

Please sign in to comment.