mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 12:24:38 +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:
@@ -86,6 +86,7 @@ const SessionStoreKey = "session_store_key"
|
||||
// scraping options
|
||||
const ScrapersPath = "scrapers_path"
|
||||
const ScraperUserAgent = "scraper_user_agent"
|
||||
const ScraperCertCheck = "scraper_cert_check"
|
||||
const ScraperCDPPath = "scraper_cdp_path"
|
||||
|
||||
// stash-box options
|
||||
@@ -274,6 +275,17 @@ func GetScraperCDPPath() string {
|
||||
return viper.GetString(ScraperCDPPath)
|
||||
}
|
||||
|
||||
// GetScraperCertCheck returns true if the scraper should check for insecure
|
||||
// certificates when fetching an image or a page.
|
||||
func GetScraperCertCheck() bool {
|
||||
ret := true
|
||||
if viper.IsSet(ScraperCertCheck) {
|
||||
ret = viper.GetBool(ScraperCertCheck)
|
||||
}
|
||||
|
||||
return ret
|
||||
}
|
||||
|
||||
func GetStashBoxes() []*models.StashBox {
|
||||
var boxes []*models.StashBox
|
||||
viper.UnmarshalKey(StashBoxes, &boxes)
|
||||
|
||||
Reference in New Issue
Block a user