Volumio2
Volumio2 copied to clipboard
Album Art server serves invalid cache-control header
Volumio version: 2.907 Browser: Chrome 94 (Mac)
I've observed that the cache-control header returned from /albumart is invalid
i.e.
GET http://192.168.X.X/albumart?cacheid=277&path=%2FMusic%2FBjork%2F2005%20-%20Drawing%20Restraint%209&icon=folder-o&metadata=false
HTTP/1.1 200 OK
Content-Type: image/jpeg
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: GET,PUT,POST,DELETE,OPTIONS
Access-Control-Allow-Headers: Content-Type, Authorization, Content-Length, X-Requested-With
Cache-Control: public, max-age=undefined
Date: Wed, 04 Aug 2021 06:53:02 GMT
Content-Length: 86212
Connection: keep-alive
ETag: W/"150c4-17b0fefd8b0"
Accept-Ranges: bytes
Last-Modified: Wed, 04 Aug 2021 06:53:02 GMT
X-Powered-By: Express
I'm actually not sure how browsers respond to invalid cache-control headers but I assume it takes some default which doesn't appear to be "no-store".
This looks to be a scope issue as maxage is defined at the top but not making it into the promise for some reason https://github.com/volumio/Volumio2/blob/master/app/plugins/miscellanea/albumart/albumart.js#L418
Also I think the maxage is way too long. Can I suggest 86400 (24h)