mirror of
https://github.com/stashapp/stash.git
synced 2025-12-18 04:44:37 +03:00
Use referer on xpath getImage, apply printHTML to subscraper also (#661)
This commit is contained in:
@@ -64,7 +64,14 @@ func getImage(url string) (*string, error) {
|
||||
}
|
||||
|
||||
// assume is a URL for now
|
||||
|
||||
// set the host of the URL as the referer
|
||||
if req.URL.Scheme != "" {
|
||||
req.Header.Set("Referer", req.URL.Scheme+"://"+req.Host)
|
||||
}
|
||||
|
||||
resp, err := client.Do(req)
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user