mirror of
https://github.com/coder/coder.git
synced 2025-07-03 16:13:58 +00:00
fix: set request header before do (#11706)
This commit is contained in:
@ -300,6 +300,7 @@ func (c *DeviceAuth) AuthorizeDevice(ctx context.Context) (*codersdk.ExternalAut
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
req.Header.Set("Accept", "application/json")
|
||||||
|
|
||||||
do := http.DefaultClient.Do
|
do := http.DefaultClient.Do
|
||||||
if c.Config != nil {
|
if c.Config != nil {
|
||||||
@ -310,7 +311,6 @@ func (c *DeviceAuth) AuthorizeDevice(ctx context.Context) (*codersdk.ExternalAut
|
|||||||
}
|
}
|
||||||
|
|
||||||
resp, err := do(req)
|
resp, err := do(req)
|
||||||
req.Header.Set("Accept", "application/json")
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user