Ensure Content-Type is set to application/json

Signed-off-by: Chris Harris <cjh@lbl.gov>
This commit is contained in:
Chris Harris 2026-01-15 20:38:24 +00:00
parent 581aca14b8
commit 93a1fea300
No known key found for this signature in database
GPG key ID: 9DAE9BAB4FBA0FEE

View file

@ -183,6 +183,7 @@ func (s *Server) StartLogin(clients []oauth.Client, params ServerParams) error {
return
}
w.Header().Set("Content-Type", "application/json")
w.Write(jwks)
})
r.HandleFunc("/token", func(w http.ResponseWriter, r *http.Request) {
@ -218,6 +219,7 @@ func (s *Server) StartLogin(clients []oauth.Client, params ServerParams) error {
http.Redirect(w, r, "/error", http.StatusInternalServerError)
return
}
w.Header().Set("Content-Type", "application/json")
w.Write([]byte(accessToken))
}
})