Skip to content

Commit

Permalink
fix(115): user-agent lost on upload (close #4831)
Browse files Browse the repository at this point in the history
  • Loading branch information
xhofe committed Jul 23, 2023
1 parent d4ea878 commit 4c2535c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions drivers/115/util.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package _115

import (
"crypto/tls"
"fmt"

"github.com/SheltonZhu/115driver/pkg/driver"
"github.com/alist-org/alist/v3/drivers/base"
"github.com/alist-org/alist/v3/internal/conf"
"github.com/pkg/errors"
)

Expand All @@ -14,9 +15,11 @@ func (d *Pan115) login() error {
var err error
opts := []driver.Option{
driver.UA(UserAgent),
func(c *driver.Pan115Client) {
c.Client.SetTLSClientConfig(&tls.Config{InsecureSkipVerify: conf.Conf.TlsInsecureSkipVerify})
},
}
d.client = driver.New(opts...)
d.client.SetHttpClient(base.HttpClient)
cr := &driver.Credential{}
if d.Addition.QRCodeToken != "" {
s := &driver.QRCodeSession{
Expand Down

0 comments on commit 4c2535c

Please sign in to comment.