mirror of
https://github.com/willnorris/imageproxy.git
synced 2026-06-07 18:35:13 +02:00
Add an Accept-Language header to requested images
Some financial institutions will return an error via text/html if a request is made without an Accept-Language header.
This commit is contained in:
parent
65d30640c6
commit
fc97bd1862
1 changed files with 1 additions and 0 deletions
|
|
@ -181,6 +181,7 @@ func (p *Proxy) serveImage(w http.ResponseWriter, r *http.Request) {
|
|||
|
||||
actualReq, _ := http.NewRequest("GET", req.String(), nil)
|
||||
actualReq.Header.Set("Accept", "*/*")
|
||||
actualReq.Header.Set("Accept-Language", "*")
|
||||
if p.UserAgent != "" {
|
||||
actualReq.Header.Set("User-Agent", p.UserAgent)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue