Skip to content

Commit d67c9d1

Browse files
authored
fix: set request header before do (#11706)
1 parent ccfd1a5 commit d67c9d1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

coderd/externalauth/externalauth.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,7 @@ func (c *DeviceAuth) AuthorizeDevice(ctx context.Context) (*codersdk.ExternalAut
300300
if err != nil {
301301
return nil, err
302302
}
303+
req.Header.Set("Accept", "application/json")
303304

304305
do := http.DefaultClient.Do
305306
if c.Config != nil {
@@ -310,7 +311,6 @@ func (c *DeviceAuth) AuthorizeDevice(ctx context.Context) (*codersdk.ExternalAut
310311
}
311312

312313
resp, err := do(req)
313-
req.Header.Set("Accept", "application/json")
314314
if err != nil {
315315
return nil, err
316316
}

0 commit comments

Comments
 (0)