mirror of https://github.com/gofiber/fiber.git
👷 Fix G304 and allow G402
parent
f4307905a4
commit
5093eb8e27
|
@ -348,7 +348,7 @@ func (a *Agent) FileData(formFiles ...*FormFile) *Agent {
|
||||||
|
|
||||||
// SendFile reads file and appends it to multipart form request.
|
// SendFile reads file and appends it to multipart form request.
|
||||||
func (a *Agent) SendFile(filename string, fieldname ...string) *Agent {
|
func (a *Agent) SendFile(filename string, fieldname ...string) *Agent {
|
||||||
content, err := ioutil.ReadFile(filename)
|
content, err := ioutil.ReadFile(filepath.Clean(filename))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
a.errs = append(a.errs, err)
|
a.errs = append(a.errs, err)
|
||||||
return a
|
return a
|
||||||
|
@ -467,8 +467,10 @@ func (a *Agent) Reuse() *Agent {
|
||||||
// certificate chain and host name.
|
// certificate chain and host name.
|
||||||
func (a *Agent) InsecureSkipVerify() *Agent {
|
func (a *Agent) InsecureSkipVerify() *Agent {
|
||||||
if a.HostClient.TLSConfig == nil {
|
if a.HostClient.TLSConfig == nil {
|
||||||
|
/* #nosec G402 */
|
||||||
a.HostClient.TLSConfig = &tls.Config{InsecureSkipVerify: true}
|
a.HostClient.TLSConfig = &tls.Config{InsecureSkipVerify: true}
|
||||||
} else {
|
} else {
|
||||||
|
/* #nosec G402 */
|
||||||
a.HostClient.TLSConfig.InsecureSkipVerify = true
|
a.HostClient.TLSConfig.InsecureSkipVerify = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue