Merge remote-tracking branch 'origin/main'

This commit is contained in:
Mmx233
2023-09-29 10:52:37 +08:00
2 changed files with 5 additions and 4 deletions

View File

@@ -57,8 +57,8 @@ settings:
log: log:
debug_level: false #打印调试日志 debug_level: false #打印调试日志
write_file: false #写日志文件 write_file: false #写日志文件
log_path: ./ #日志文件存放目录路径 file_path: ./ #日志文件存放目录路径
log_name: "" #指定日志文件名 file_name: "" #指定日志文件名
ddns: #校园网内网 ip ddns ddns: #校园网内网 ip ddns
enable: false enable: false
domain: www.example.com domain: www.example.com
@@ -203,4 +203,4 @@ func main() {
} }
} }
} }
``` ```

View File

@@ -28,7 +28,8 @@ func (a *Api) Init(https bool, domain string, client *http.Client) {
// 初始化 http client // 初始化 http client
a.Client = client a.Client = client
a.NoDirect = &(*client) copyClient := *client
a.NoDirect = &copyClient
a.NoDirect.CheckRedirect = func(_ *http.Request, _ []*http.Request) error { a.NoDirect.CheckRedirect = func(_ *http.Request, _ []*http.Request) error {
return http.ErrUseLastResponse return http.ErrUseLastResponse
} }