Signed-off-by: Shivansh Vij <shivanshvij@outlook.com>
This commit is contained in:
Shivansh Vij 2022-05-26 15:49:49 -04:00 committed by Shivansh Vij
parent 6da5187b47
commit cbf158bcc0
No known key found for this signature in database
GPG Key ID: 77E32CE606C64564

View File

@ -141,6 +141,10 @@ func (s *Server) handleDeviceCode(w http.ResponseWriter, r *http.Request) {
// https://tools.ietf.org/html/rfc8628#section-3.2 // https://tools.ietf.org/html/rfc8628#section-3.2
w.Header().Set("Cache-Control", "no-store") w.Header().Set("Cache-Control", "no-store")
// Response type should be application/json according to
// https://datatracker.ietf.org/doc/html/rfc6749#section-5.1
w.Header().Set("Content-Type", "application/json")
enc := json.NewEncoder(w) enc := json.NewEncoder(w)
enc.SetEscapeHTML(false) enc.SetEscapeHTML(false)
enc.SetIndent("", " ") enc.SetIndent("", " ")