mirror of
https://github.com/go-acme/lego.git
synced 2025-07-02 05:54:28 +02:00
fix: user-agent string order. (#566)
This commit is contained in:
committed by
Wyatt Johnson
parent
27e0f97c9d
commit
7fedfd1388
@ -155,6 +155,6 @@ func postJSON(j *jws, uri string, reqBody, respBody interface{}) (http.Header, e
|
|||||||
|
|
||||||
// userAgent builds and returns the User-Agent string to use in requests.
|
// userAgent builds and returns the User-Agent string to use in requests.
|
||||||
func userAgent() string {
|
func userAgent() string {
|
||||||
ua := fmt.Sprintf("%s (%s; %s) %s %s", defaultGoUserAgent, runtime.GOOS, runtime.GOARCH, ourUserAgent, UserAgent)
|
ua := fmt.Sprintf("%s %s (%s; %s) %s", UserAgent, ourUserAgent, runtime.GOOS, runtime.GOARCH, defaultGoUserAgent)
|
||||||
return strings.TrimSpace(ua)
|
return strings.TrimSpace(ua)
|
||||||
}
|
}
|
||||||
|
@ -68,7 +68,7 @@ func setup(c *cli.Context) (*Configuration, *Account, *acme.Client) {
|
|||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
acme.UserAgent = fmt.Sprintf("le-go/cli %s", c.App.Version)
|
acme.UserAgent = fmt.Sprintf("lego-cli/%s", c.App.Version)
|
||||||
|
|
||||||
client, err := acme.NewClient(c.GlobalString("server"), acc, keyType)
|
client, err := acme.NewClient(c.GlobalString("server"), acc, keyType)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Reference in New Issue
Block a user