noauth 처리

This commit is contained in:
2023-06-27 00:03:43 +09:00
parent d17c53c79c
commit 72e94ccfc3
2 changed files with 38 additions and 5 deletions

View File

@ -37,9 +37,6 @@ func download(dir string, urlpath string, accessToken string) (target string, er
}
req, _ := http.NewRequest("GET", urlpath, nil)
if len(accessToken) > 0 {
req.Header.Add("Authorization", accessToken)
}
req.Header.Add("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36 Edg/111.0.1661.51")
resp, err := http.DefaultClient.Do(req)
if err != nil {