Skip to content

Commit

Permalink
/apis endpoint should have json content type (#38)
Browse files Browse the repository at this point in the history
Since it's already serialized it doesn't go through `serializeAndWrite`
and so we don't set `Content-Type`

Having the wrong `Content-Type` seems to cause issues with newer
versions of `oc`, as it worked fine before and I think my `oc` version
is the only thing that changed
  • Loading branch information
omertuc authored Nov 9, 2023
1 parent 189f6e4 commit 2e305e0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/handler/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ func New(l *zap.Logger, baseDir string, port string) (*mux.Router, error) {
}
}).Methods(http.MethodGet)
router.HandleFunc("/apis", func(w http.ResponseWriter, _ *http.Request) {
w.Header().Set("Content-Type", "application/json")
w.Write(serializedGroupList)
}).Methods(http.MethodGet)
for groupVersion := range groupSerializedResourceListMap {
Expand Down

0 comments on commit 2e305e0

Please sign in to comment.