mirror of
https://github.com/usual2970/certimate.git
synced 2025-08-13 21:01:45 +00:00
feat: add user-agent http header for thirdparty sdks
This commit is contained in:
@@ -26,6 +26,7 @@ func NewClient(username, password string) *Client {
|
||||
}
|
||||
client.client = resty.New().
|
||||
SetBaseURL("https://console.upyun.com").
|
||||
SetHeader("User-Agent", "certimate").
|
||||
SetPreRequestHook(func(c *resty.Client, req *http.Request) error {
|
||||
if client.loginCookie != "" {
|
||||
req.Header.Set("Cookie", client.loginCookie)
|
||||
|
Reference in New Issue
Block a user