TUN-8487: Add user-agent for quick-tunnel requests
This commit is contained in:
parent
1f38deca1e
commit
d875839e5e
|
@ -35,7 +35,13 @@ func RunQuickTunnel(sc *subcommandContext) error {
|
||||||
Timeout: httpTimeout,
|
Timeout: httpTimeout,
|
||||||
}
|
}
|
||||||
|
|
||||||
resp, err := client.Post(fmt.Sprintf("%s/tunnel", sc.c.String("quick-service")), "application/json", nil)
|
req, err := http.NewRequest(http.MethodPost, fmt.Sprintf("%s/tunnel", sc.c.String("quick-service")), nil)
|
||||||
|
if err != nil {
|
||||||
|
return errors.Wrap(err, "failed to build quick tunnel request")
|
||||||
|
}
|
||||||
|
req.Header.Add("Content-Type", "application/json")
|
||||||
|
req.Header.Add("User-Agent", buildInfo.UserAgent())
|
||||||
|
resp, err := client.Do(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return errors.Wrap(err, "failed to request quick Tunnel")
|
return errors.Wrap(err, "failed to request quick Tunnel")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue