mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 04:14:39 +03:00
Skip insecure certificates check when scraping (#1120)
* Ignore insecure certificates when scraping * add ScraperCertCheck to scraper config options
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
package scraper
|
||||
|
||||
import (
|
||||
"crypto/tls"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
stashConfig "github.com/stashapp/stash/pkg/manager/config"
|
||||
"github.com/stashapp/stash/pkg/models"
|
||||
"github.com/stashapp/stash/pkg/utils"
|
||||
)
|
||||
@@ -83,6 +85,8 @@ func setMovieBackImage(m *models.ScrapedMovie, globalConfig GlobalConfig) error
|
||||
|
||||
func getImage(url string, globalConfig GlobalConfig) (*string, error) {
|
||||
client := &http.Client{
|
||||
Transport: &http.Transport{ // ignore insecure certificates
|
||||
TLSClientConfig: &tls.Config{InsecureSkipVerify: !stashConfig.GetScraperCertCheck()}},
|
||||
Timeout: imageGetTimeout,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user