mirror of
https://github.com/willnorris/imageproxy.git
synced 2026-05-09 12:02:39 +02:00
ignore favicon requests
This commit is contained in:
parent
54ddf21df2
commit
f476aa27c3
1 changed files with 4 additions and 0 deletions
|
|
@ -64,6 +64,10 @@ func NewProxy(transport http.RoundTripper, cache Cache) *Proxy {
|
||||||
|
|
||||||
// ServeHTTP handles image requests.
|
// ServeHTTP handles image requests.
|
||||||
func (p *Proxy) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
func (p *Proxy) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||||
|
if r.URL.Path == "/favicon.ico" {
|
||||||
|
return // ignore favicon requests
|
||||||
|
}
|
||||||
|
|
||||||
req, err := NewRequest(r)
|
req, err := NewRequest(r)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
msg := fmt.Sprintf("invalid request URL: %v", err)
|
msg := fmt.Sprintf("invalid request URL: %v", err)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue