imageproxy
imageproxy copied to clipboard
cache with concurrent requests
I have a page with big slider and thumbs under it. I put resized images in both, but source images are the same. Source images goes from s3. And thumbs are not loading with error. In verbose mode I see following:
31.07.2019 16:52:342019/07/31 13:52:34 request: {Method:GET URL:https://someminio.com/dev/5b067fd85d773_799bad5a3b514f096e69bbc4a7896cd9.jpg#200x200,fit Proto:HTTP/1.1 ProtoMajor:1 ProtoMinor:1 Header:map[Accept:[image/*] User-Agent:[willnorris/imageproxy]] Body:<nil> GetBody:<nil> ContentLength:0 TransferEncoding:[] Close:false Host:someminio.com Form:map[] PostForm:map[] MultipartForm:<nil> Trailer:map[] RemoteAddr: RequestURI: TLS:<nil> Cancel:<nil> Response:<nil> ctx:<nil>} (served from cache: true)
31.07.2019 16:52:342019/07/31 13:52:34 content-type not allowed: "text/html"
If I turn cache off everything is ok. I assume that second request arrives when cache is in progress and somehow damage it
Also I noticed that request to source images goes to different hosts through load balancer, response has different X-Host header.