mirror of
https://github.com/restic/restic.git
synced 2025-03-16 00:00:05 +01:00
only support signed certificates
This commit is contained in:
parent
ee076ffa77
commit
e07607106c
2 changed files with 2 additions and 4 deletions
|
@ -2,7 +2,6 @@ package rest
|
|||
|
||||
import (
|
||||
"bytes"
|
||||
"crypto/tls"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
|
@ -93,9 +92,7 @@ func Open(url *url.URL) (*Rest, error) {
|
|||
for i := 0; i < connLimit; i++ {
|
||||
connChan <- struct{}{}
|
||||
}
|
||||
tr := &http.Transport{
|
||||
TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
|
||||
}
|
||||
tr := &http.Transport{}
|
||||
client := http.Client{Transport: tr}
|
||||
return &Rest{url: url, connChan: connChan, client: &client}, nil
|
||||
}
|
||||
|
|
|
@ -195,6 +195,7 @@ func create(u string) (backend.Backend, error) {
|
|||
if url.Scheme == "s3" {
|
||||
return s3.Open(url.Host, url.Path[1:])
|
||||
} else if url.Scheme == "http" || url.Scheme == "https" {
|
||||
|
||||
return rest.Open(url)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue